Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const express = require("express");
const bp = require("body-parser");
const port = 5000;
const app = express();
app.use(bp.urlencoded({ extended: false }));
app.use(bp.json());
app.use(require("morgan")("dev"));
app.get("/", (req, res) => {
var obj = {
name: "rizky"
};
res.json(obj);
});
app.listen(port, () => {
console.log("Express server listning on port " + port);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment