Created
September 17, 2014 12:52
-
-
Save albertosouza/225f3ca8cc8f8a3369fd to your computer and use it in GitHub Desktop.
Exemplo de local.js do we.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* file: config/local.js | |
* | |
* Local environment settings | |
* | |
* While you're DEVELOPING your app, this config file should include | |
* any settings specifically for your development computer (db passwords, etc.) | |
* | |
* When you're ready to deploy your app in PRODUCTION, you can always use this file | |
* for configuration options specific to the server where the app will be deployed. | |
* But environment variables are usually the best way to handle production settings. | |
* | |
* PLEASE NOTE: | |
* This file is included in your .gitignore, so if you're using git | |
* as a version control solution for your Sails app, keep in mind that | |
* this file won't be committed to your repository! | |
* | |
* Good news is, that means you can specify configuration for your local | |
* machine in this file without inadvertently committing personal information | |
* (like database passwords) to the repo. Plus, this prevents other members | |
* of your team from commiting their local configuration changes on top of yours. | |
* | |
* | |
* For more information, check out: | |
* http://sailsjs.org/#documentation | |
*/ | |
module.exports = { | |
appName: 'We.js Example', | |
/** | |
* Change this config to your we.js servers | |
*/ | |
wejs: { | |
providers: { | |
wembed: 'http://wembed.wejs.org', | |
accounts: 'http://accounts.wejs.org', | |
api: 'http://localhost:1333', | |
cookieDomain: '.wejs.dev' | |
} | |
}, | |
// change to true to force browser refresh javascript cache automaticaly | |
// use it only for development | |
forceBrowserCacheRefresh: true, | |
fileUploadPath: 'files/uploads/files', | |
imageUploadPath: 'files/uploads/images', | |
port: process.env.PORT || 1333, | |
/** | |
* Client side configs | |
* @type {Object} | |
*/ | |
clientside: { | |
// change to true to force browser refresh javascript cache automaticaly | |
// use it only for development | |
forceBrowserCacheRefresh: true, | |
enableLiveReload: false, | |
// Plugin load types define load execution order | |
plugins: { | |
loadTypes: [ | |
'Core' , | |
'Plugin', | |
'Extension' | |
] | |
}, | |
// enable or disable we.js client side plugins here | |
pluginsDefaultEnabled: [ | |
'weHTTPjQuery', | |
'weSocketIO', | |
'weI18njs', | |
//'weMessenger', | |
// we.js plugin logger | |
//'i18njs-log-untranslated-texts', | |
'weEmberPlugin' | |
], | |
// we.js logs | |
log: { | |
events: true, | |
hooks: true | |
} | |
}, | |
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: false | |
}, | |
//environment: 'production', | |
email: { | |
fromName: 'Comunidade de Práticas', | |
siteEmail: 'no-reply@wejs.org', | |
defaultService: 'Mandrill', | |
services: { | |
Mandrill: { | |
service: 'Mandrill', | |
type: 'SMTP', | |
host: 'smtp.mandrillapp.com', | |
port: 587, | |
debug: true, | |
auth: { | |
user: 'mandrillEmail@emailhost', | |
pass: 'mandrillKey' | |
} | |
}, | |
Live: { | |
service: 'Live', | |
type: 'SMTP', | |
host: 'smtp-mail.outlook.com', // hostname | |
secureConnection: false, // TLS requires secureConnection to be false | |
port: 587, // port for secure SMTP | |
auth: { | |
user: 'YouEmail@hotmail.com', | |
pass: 'password' | |
}, | |
tls: { | |
ciphers:'SSLv3' | |
} | |
}, | |
gmail: { | |
service: 'gmail', | |
type: 'SMTP', | |
auth: { | |
user: 'yourGmailEMail@gmail.com', | |
pass: 'password' | |
} | |
} | |
} | |
}, | |
connections: { | |
mongoDev: { | |
adapter : 'sails-mongo', | |
host : 'localhost', | |
port : 27017, | |
user : '', | |
password : '', | |
database : 'wejs_sails' | |
}, | |
mysql1: { | |
module : 'sails-mysql', | |
host : 'localhost', | |
port : 3306, | |
user : 'user', | |
password : 'password', // your db password | |
database : 'wejs_sails' | |
} | |
}, | |
models: { | |
migrate: 'drop', | |
connection: 'mongoDev' | |
}, | |
session: { | |
adapter: 'mongo', | |
host: 'localhost', | |
port: 27017, | |
db: 'wejs_sails', | |
collection: 'sessions', | |
'auto_reconnect': true, | |
cookie: { | |
originalMaxAge: 2592000000 // +-30 days | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment