Skip to content

Instantly share code, notes, and snippets.

Created May 5, 2019
What would you like to do?
basic node express app
const http = require("http");
const express = require("express");
const app = express();
app.set('view engine', 'ejs');
const port = 5000; ;
app.get("/",(req,res)=> {
res.end("Hello world");
app.use(express.static(__dirname + "/"));
var server = http.createServer(app);
server.listen(port); // Point it to the port we defined above.
console.log("ready at port " +port);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment