Basic server

PHOTO EMBED

Thu Oct 07 2021 04:52:40 GMT+0000 (UTC)

Saved by @rook12 #javascript

const port = process.env.PORT || 5000;
const app = require("./app");
const mongoose = require("mongoose");

mongoose.connect("mongodb://localhost:27017/mongo");

app.listen(port, () => {
  console.log(`API server started at http://localhost:${port}`);
});
content_copyCOPY