Created
December 24, 2016 01:09
-
-
Save theblacksquid/2c5aecad8aacec91ea711af6f7109d85 to your computer and use it in GitHub Desktop.
Generic code for serving static files using express
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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