2 /*eslint no-process-env:0*/
3 var path = require('path');
4 var _ = require('lodash');
6 /*function requiredProcessEnv(name) {
7 if(!process.env[name]) {
8 throw new Error('You must set the ' + name + ' environment variable');
10 return process.env[name];
13 // All configurations will extend these options
14 // ============================================
16 env: process.env.NODE_ENV,
18 // Root path of server
19 root: path.normalize(__dirname + '/../../..'),
22 browserSyncPort: process.env.BROWSER_SYNC_PORT || 3000,
24 port: process.env.PORT || 9000,
26 ip: process.env.IP || '127.0.0.1',
28 // Should we populate the DB with sample data?
31 // Secret for session, you will want to change this and make it an environment variable
33 session: 'xcally-motion-session-secret',
34 recording: 'xcally-motion-recording-secret'
38 // Export the config object based on the NODE_ENV
39 // ==============================================
40 module.exports = _.merge(
43 require('./' + (process.env.NODE_ENV || 'development') + '.js') || {});