Created
October 11, 2012 15:34
-
-
Save mrjasonweaver/3873254 to your computer and use it in GitHub Desktop.
Simple static file server with Connect and Node.js
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
var connect = require('connect'); | |
var port = 9123; | |
var filepath = '/FILE_PATH' | |
server = connect.createServer( | |
connect.favicon() | |
, connect.logger() | |
, connect.static(__dirname + filepath) | |
) | |
server.listen(port); | |
console.log("Static file server now 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