mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-29 15:32:40 +00:00
Move NODE_ENV to service file; remove from server.js and config/default.json
This commit is contained in:
@@ -27,8 +27,6 @@ const config = require('nconf')
|
||||
.file('environment', { file: `config/${process.env.NODE_ENV}.json` })
|
||||
.file('defaults', { file: 'config/default.json' });
|
||||
|
||||
if(!process.env.NODE_ENV) {process.env.NODE_ENV = (config.get('environment') || 'local');}
|
||||
|
||||
//DB
|
||||
const mongoose = require('mongoose');
|
||||
mongoose.connect(config.get('mongodb_uri') || config.get('mongolab_uri') || 'mongodb://localhost/naturalcrit',
|
||||
|
||||
Reference in New Issue
Block a user