Skip to content

Instantly share code, notes, and snippets.

@orfeomorello
Created September 18, 2015 08:07
Show Gist options
  • Save orfeomorello/704f8639a5afcf50871f to your computer and use it in GitHub Desktop.
Save orfeomorello/704f8639a5afcf50871f to your computer and use it in GitHub Desktop.
Simple Node.js web server available on port 8181
var connect = require('connect');
var http = require('http');
var app = connect();
var compression = require('compression')
app.use(compression())
var static = require('serve-static');
app.use(static(__dirname + "/httpdocs"));
http.createServer(app).listen(process.env.PORT || 8181);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment