Skip to content

Instantly share code, notes, and snippets.

@ogt
Created February 19, 2013 05:32
Show Gist options
  • Save ogt/4983355 to your computer and use it in GitHub Desktop.
Save ogt/4983355 to your computer and use it in GitHub Desktop.
minimal web server using connect
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