-
-
Save ogt/4983355 to your computer and use it in GitHub Desktop.
minimal web server using connect
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 fs = require('fs'); | |
var path = require('path'); | |
var port = process.env.PORT || 8081; | |
var connect = require('connect'); | |
connect.createServer( | |
connect.logger('dev'), | |
connect.favicon('public/favicon.ico'), | |
connect.static(__dirname + '/public') | |
).listen(port); | |
console.log('Server running at http://127.0.0.1:'+port+'/'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment