mirror of
https://github.com/mmumshad/ansible-playable.git
synced 2025-03-09 23:38:54 +00:00
Initial Commit
This commit is contained in:
commit
c92f737237
273 changed files with 16964 additions and 0 deletions
16
server/config/environment/development.js
Normal file
16
server/config/environment/development.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
'use strict';
|
||||
/*eslint no-process-env:0*/
|
||||
|
||||
// Development specific configuration
|
||||
// ==================================
|
||||
module.exports = {
|
||||
|
||||
// MongoDB connection options
|
||||
mongo: {
|
||||
uri: 'mongodb://db/app2-dev'
|
||||
},
|
||||
|
||||
// Seed database on startup
|
||||
seedDB: true
|
||||
|
||||
};
|
66
server/config/environment/index.js
Normal file
66
server/config/environment/index.js
Normal file
|
@ -0,0 +1,66 @@
|
|||
'use strict';
|
||||
/*eslint no-process-env:0*/
|
||||
|
||||
import path from 'path';
|
||||
import _ from 'lodash';
|
||||
|
||||
/*function requiredProcessEnv(name) {
|
||||
if(!process.env[name]) {
|
||||
throw new Error('You must set the ' + name + ' environment variable');
|
||||
}
|
||||
return process.env[name];
|
||||
}*/
|
||||
|
||||
// All configurations will extend these options
|
||||
// ============================================
|
||||
var all = {
|
||||
env: process.env.NODE_ENV,
|
||||
|
||||
// Root path of server
|
||||
root: path.normalize(`${__dirname}/../../..`),
|
||||
|
||||
// Browser-sync port
|
||||
browserSyncPort: process.env.BROWSER_SYNC_PORT || 3000,
|
||||
|
||||
// Server port
|
||||
port: process.env.PORT || 9000,
|
||||
|
||||
// Server IP
|
||||
ip: process.env.IP || '0.0.0.0',
|
||||
|
||||
// Should we populate the DB with sample data?
|
||||
seedDB: false,
|
||||
|
||||
// Secret for session, you will want to change this and make it an environment variable
|
||||
secrets: {
|
||||
session: 'app2-secret'
|
||||
},
|
||||
|
||||
// MongoDB connection options
|
||||
mongo: {
|
||||
options: {
|
||||
db: {
|
||||
safe: true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
facebook: {
|
||||
clientID: process.env.FACEBOOK_ID || 'id',
|
||||
clientSecret: process.env.FACEBOOK_SECRET || 'secret',
|
||||
callbackURL: `${process.env.DOMAIN || ''}/auth/facebook/callback`
|
||||
},
|
||||
|
||||
google: {
|
||||
clientID: process.env.GOOGLE_ID || 'id',
|
||||
clientSecret: process.env.GOOGLE_SECRET || 'secret',
|
||||
callbackURL: `${process.env.DOMAIN || ''}/auth/google/callback`
|
||||
}
|
||||
};
|
||||
|
||||
// Export the config object based on the NODE_ENV
|
||||
// ==============================================
|
||||
module.exports = _.merge(
|
||||
all,
|
||||
require('./shared'),
|
||||
require(`./${process.env.NODE_ENV}.js`) || {});
|
24
server/config/environment/production.js
Normal file
24
server/config/environment/production.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
'use strict';
|
||||
/*eslint no-process-env:0*/
|
||||
|
||||
// Production specific configuration
|
||||
// =================================
|
||||
module.exports = {
|
||||
// Server IP
|
||||
ip: process.env.OPENSHIFT_NODEJS_IP
|
||||
|| process.env.ip
|
||||
|| undefined,
|
||||
|
||||
// Server port
|
||||
port: process.env.OPENSHIFT_NODEJS_PORT
|
||||
|| process.env.PORT
|
||||
|| 8080,
|
||||
|
||||
// MongoDB connection options
|
||||
mongo: {
|
||||
uri: process.env.MONGODB_URI
|
||||
|| process.env.MONGOHQ_URL
|
||||
|| process.env.OPENSHIFT_MONGODB_DB_URL + process.env.OPENSHIFT_APP_NAME
|
||||
|| 'mongodb://localhost/app2'
|
||||
}
|
||||
};
|
11
server/config/environment/shared.js
Normal file
11
server/config/environment/shared.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
'use strict';
|
||||
|
||||
exports = module.exports = {
|
||||
// List of user roles
|
||||
userRoles: ['guest', 'user', 'admin'],
|
||||
'scriptEngine' : {
|
||||
'host' : 'localhost',
|
||||
'user' : 'root',
|
||||
'password' : 'P@ssw0rd@123'
|
||||
}
|
||||
};
|
21
server/config/environment/test.js
Normal file
21
server/config/environment/test.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
'use strict';
|
||||
/*eslint no-process-env:0*/
|
||||
|
||||
// Test specific configuration
|
||||
// ===========================
|
||||
module.exports = {
|
||||
// MongoDB connection options
|
||||
mongo: {
|
||||
uri: 'mongodb://localhost/app2-test'
|
||||
},
|
||||
sequelize: {
|
||||
uri: 'sqlite://',
|
||||
options: {
|
||||
logging: false,
|
||||
storage: 'test.sqlite',
|
||||
define: {
|
||||
timestamps: false
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue