mappum/0x10code — pull request #20 by jazzychad (2012-04-17 10:15:24+00:00)
Title: properly cache the static assets

Currently the static assets are being manually rendered through routes. This diff sets up the proper asset directory and enforces the caching you'd like by returning 304's for subsequent asset requests. Placing app.use(app.router) after the app.use(express.static(..)) line ensures that express will search for/serve static files before using the app's routes. I tested this locally to make sure it worked, but you might want to double check in your environment.