Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mongoose.connect(env.dbURI);
- mongoose.connection.on("error", (err) => {
- console.log("Can't connect to database\n\n", err);
- process.exit(1);
- });
- mongoose.connection.on("open", () => {
- console.log("Connect to database");
- app.listen(env.PORT, () => {
- console.log("Server listen port", env.PORT);
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement