Created
September 18, 2015 08:07
-
-
Save orfeomorello/704f8639a5afcf50871f to your computer and use it in GitHub Desktop.
Simple Node.js web server available on port 8181
This file contains hidden or 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 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