krakenjs/kraken-js — pull request #272 by sixlettervariables (2014-08-12 15:41:05+00:00)
Title: Improved middleware documentation

One of my big hangups when starting with Kraken has been the difficulty in getting clear guidance on the included middleware and how to extend it. For instance, it was not immediately obvious that `compression` was actually named `compress` in the default middleware configuration. This is a *large* update to the README, which probably means it should be segregated to another location. However, I figured it would be better to get feedback on the content here prior to changing any structure.

This PR includes complete documentation of the default middleware included with Kraken. Each of the options passed are explained using the language found in the loaded modules and links to each module's NPM or Github repository are included. Kraken's default values are given and their meaning when needed.

Additionally, a section on extending middleware is provided. There is a quick note on how to change the route of middleware is given with the classic 'serve-static' example. Lastly, an example showing how to perform more complicated middleware configuration is included as it was a bear getting express-session and connect-redis to behave together without realizing a simpler strategy would be to switch out the default session for your own (the example roughly uses the code from krakenjs/meddleware/issues/8).