Skip to content

Instantly share code, notes, and snippets.

@ruanyl
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruanyl/94d55cfe7e9290c4e569 to your computer and use it in GitHub Desktop.
Save ruanyl/94d55cfe7e9290c4e569 to your computer and use it in GitHub Desktop.
simple node js http server
1.npm install connect --save
2.touch server.js
var connect = require('connect');
connect().use(connect.static(__dirname)).listen(8080);
3.node server.js
4.visit localhost:8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment