Skip to content

Instantly share code, notes, and snippets.

@creativeaura
Created May 9, 2013 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save creativeaura/5546835 to your computer and use it in GitHub Desktop.
Save creativeaura/5546835 to your computer and use it in GitHub Desktop.
NodeJS Server to serve static HTML files
{
"name" : "ServeStaticContent",
"version" : "0.0.1",
"dependencies" : {
"express" : "3.x"
}
}
var express = require('express');
var app = express();
app.use(express.compress());
app.use('/static', express.static(__dirname + '/public'));
app.listen(process.env.PORT || 3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment