Giter Club home page Giter Club logo

we-example's Introduction

We.js project example and skeleton project

Live example: http://wejs.org/

Build Status Dependency Status

Requirements

  • Redis database ( for session )
  • Mysql database ( for data )
  • node.js
  • npm

How to install

// clone the skeleton
git clone https://github.com/wejs/we-example.git we-project
// enter in folder
cd we-project
// install packages
npm install && bower install
// run for development
npm start

##How to build

// install packages
npm install && bower install
// generate prod build
grunt build
// start server as prod env
node . --prod

Example config

// file config/local.js
module.exports = {
  appName: 'We.js',

  fileUploadPath: 'files/uploads/files',
  imageUploadPath: 'files/uploads/images',

  wejs: {
    providers: {
      wembed: 'http://wembed.wejs.org',
      accounts: 'http://localhost',
      api: 'http://localhost',
      cookieDomain: '.localhost'
    }
  },

  port: process.env.PORT || 1430,

  /**
   * Client side configs
   * @type {Object}
   */
  clientside: {
    // change to true to force browser refresh javascript cache automaticaly
    // use it only for development
    forceBrowserCacheRefresh: true,

    enableLiveReload: true,

    // we.js client side logs
    log: {
      events: false,
      hooks: false
    },
    publicVars: {
      oauthNetworkServiceName: 'network'
    }
  },

  environment: process.env.NODE_ENV || 'development',
  // /environment: process.env.NODE_ENV || 'production',
  hostname: 'http://localhost',
  //host: 'http://localhost',

  site: {
    // if true send a activation email for new
    // accounts and only alow users login after account activation
    requireAccountActivation: true
  },
  //environment: 'production',

  email: {
    fromName: 'We.js example',
    siteEmail: '[email protected]',
    defaultService: 'Mandrill',
    services: {
      Mandrill: {
        service: 'Mandrill',
        type: 'SMTP',
        host: 'smtp.mandrillapp.com',
        port: 587,
        auth: {
          user: 'your-mandrill-email',
          pass: 'your-mandrill-pass'
        }
      },
      gmail: {
        service: 'gmail',
        type: 'SMTP',
        auth: {
          user: 'your-email',
          pass: 'your-password'
        }
      }
    }
  },

  connections: {
    mysql: {
      module   : 'sails-mysql',
      host     : 'localhost',
      port     : 3306,
      user     : 'your-db-username',
      password : 'your-db-pasword',
      database : 'your-db-name'
    }
  },

  models: {
    migrate: 'alter',
    connection: 'mysql'
  },

  session: {
    adapter: 'redis'
  }
};

Links

Copyright and license

Copyright 2013-2014 Alberto Souza [email protected] and contributors , under the MIT license.

we-example's People

Contributors

albertosouza avatar

Watchers

James Cloos avatar Vitor Nogueira avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.