Created
February 15, 2017 02:01
-
-
Save Paden/e5146064be4bcbd0259c3db4931a43ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return new Promise((resolve, reject) => { | |
mongoose.connect(DATABASE_URL, err => { | |
if (err) { | |
return reject(err); | |
} | |
server = app.listen(port, () => { | |
console.log(`Your app is listening on port $ {port}`); | |
resolve(server); | |
}).on('error', err => { | |
reject(err); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment