Skip to content

Instantly share code, notes, and snippets.

@markninja96
Last active March 1, 2021 18:20
Show Gist options
  • Select an option

  • Save markninja96/ef158ceef1a776deb345a902002a6a7f to your computer and use it in GitHub Desktop.

Select an option

Save markninja96/ef158ceef1a776deb345a902002a6a7f to your computer and use it in GitHub Desktop.
mongoose
.connect(
"<database connection string>",
{ useNewUrlParser: true, useUnifiedTopology: true }
)
.then((result) => {
server.listen(port);
server.on("listening", onListening);
})
.catch((err) => {
server.on("error", onError);
console.log(err);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment