Skip to content

Commit

Permalink
chore(mongodb-setup) set timeout to start express app
Browse files Browse the repository at this point in the history
  • Loading branch information
Chukwuma Ezumezu committed Oct 11, 2016
1 parent 75fbe21 commit ad41377
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ var express = require('express'),
dotenv = require('dotenv'),
io = require('socket.io');

var port = config.port,
server,
ioObj;
/**
* Main application entry file.
* Please note that the order of loading is important.
*/
dotenv.config({silent: true});

//Load configurations
//if test env, load example file
process.env.NODE_ENV = (process.env.NODE_ENV) ? process.env.NODE_ENV : 'development';
Expand All @@ -24,6 +22,10 @@ var env = process.env.NODE_ENV,
auth = require('./config/middlewares/authorization'),
mongoose = require('mongoose');

var port = config.port,
server,
ioObj;

console.log('Config.db is: ' + config.db);
//Bootstrap db connection
mongoose.connect(config.db).then((err) => {
Expand Down

0 comments on commit ad41377

Please sign in to comment.