Skip to content

Instantly share code, notes, and snippets.

@thedamian
Created May 5, 2019 17:03
Show Gist options
  • Save thedamian/bd69c8bae23328795082b88a580cbf94 to your computer and use it in GitHub Desktop.
Save thedamian/bd69c8bae23328795082b88a580cbf94 to your computer and use it in GitHub Desktop.
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