Created
February 1, 2015 15:07
-
-
Save dbrugne/a567726f63603418c4da to your computer and use it in GitHub Desktop.
Simplest static webserver with node and express
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
/** | |
* express could be installed globally (npm install -g) and loaded with global node_modules path set in NODE_PATH env | |
*/ | |
var express = require('express'); | |
var app = express(); | |
app.use(express.static(__dirname)); | |
app.listen(3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment