Skip to content

Instantly share code, notes, and snippets.

@theblacksquid
Created December 24, 2016 01:09
Show Gist options
  • Save theblacksquid/2c5aecad8aacec91ea711af6f7109d85 to your computer and use it in GitHub Desktop.
Save theblacksquid/2c5aecad8aacec91ea711af6f7109d85 to your computer and use it in GitHub Desktop.
Generic code for serving static files using express
var express = require("express");
var app = express();
app.use(express.static(__dirname + "/"));
//app.get("/", function(req, res) {
// res.send('/')
//})
app.listen(3000, function() {
console.log("Listening on port 3000")
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment