Skip to content

Instantly share code, notes, and snippets.

@milosdakic
Created August 8, 2012 01:33
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 milosdakic/3291239 to your computer and use it in GitHub Desktop.
Save milosdakic/3291239 to your computer and use it in GitHub Desktop.
Node + Express + CoffeeScript = static file server
# 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