Skip to content

Instantly share code, notes, and snippets.

@st23am
Created January 24, 2012 23:40
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 st23am/1673530 to your computer and use it in GitHub Desktop.
Save st23am/1673530 to your computer and use it in GitHub Desktop.
Serve multiple directions of static assets in node.js with express
express = require('express')
app = module.exports = express.createServer()
app.configure('development', ->
app.use(express.static("./public"))
app.use('/test', express.static("./test/public"))
#serve up specs.js when were in development for jasmine dom tests in the browser
app.get(hem.options.specsPath, hem.specsPackage().createServer())
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment