0
0
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:
G.Ambatte
2021-01-03 23:57:43 +13:00
parent 8f6270723e
commit 24f5fcb5a0
3 changed files with 2 additions and 3 deletions

View File

@@ -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',