Skip to content

Instantly share code, notes, and snippets.

@lelouchB
Created October 14, 2020 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lelouchB/bfe7c4047f7ff4dfc52dc4cdd9694016 to your computer and use it in GitHub Desktop.
Save lelouchB/bfe7c4047f7ff4dfc52dc4cdd9694016 to your computer and use it in GitHub Desktop.
const express = require("express");
const morgan = require("morgan")
const app = express();
// Middlewares
app.use(morgan("common"))
// Port
const port = 3000;
app.get("/", (req, res) => {
res.json({
message: "Hello Stranger! How are you?",
});
});
// Listen
app.listen(port, ()=>{
console.log(`Listening on port: ${port}`)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment