Last active
August 29, 2015 14:01
-
-
Save ruanyl/94d55cfe7e9290c4e569 to your computer and use it in GitHub Desktop.
simple node js http server
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
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