Created
January 11, 2010 03:43
-
-
Save isaacs/273982 to your computer and use it in GitHub Desktop.
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
chain | |
(addCustomHeaders) | |
(errorHandler) | |
(deflate) | |
(route | |
("/foo", chain(fooApp)()) // the () ends the chain | |
(/^\/blog\/(.*)/, chain(funkyBlogApp)()) // the () ends the chain | |
(/^\/static\//, chain | |
(farFutureExpiresHeader) | |
(route | |
(/^js\/(.*)\.js$/, chain | |
(javascriptHeaders) | |
(jsmin)) // no (), so fall through | |
(/^css\/(.*)\.css$/, chain | |
(cssHeaders) | |
(cssmin))))) // no (), so fall through | |
(directoryIndex) // if it's a folder, this does | |
(fileServer) | |
() | |
.listen(8000); // this starts the server. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment