Skip to content

Instantly share code, notes, and snippets.

@tanmaypatel
Created January 6, 2014 12:59
Show Gist options
  • Select an option

  • Save tanmaypatel/8282559 to your computer and use it in GitHub Desktop.

Select an option

Save tanmaypatel/8282559 to your computer and use it in GitHub Desktop.
Simple HTTP Server in Node JS
var connect = require('connect'),
http = require('http'),
app;
var serverPort = 9090;
app = connect()
.use(connect.static(__dirname));
http.createServer(app).listen(serverPort, function()
{
console.log('Running Server on http://localhost:' + serverPort);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment