Created
August 8, 2012 01:33
-
-
Save milosdakic/3291239 to your computer and use it in GitHub Desktop.
Node + Express + CoffeeScript = static file 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
# use express for server/middleware | |
express = require 'express' | |
# create new instance of express | |
app = express() | |
# set static directory to root directory of this file | |
app.use express.static __dirname | |
# run the application on port 9000 | |
app.listen 9000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment