krakenjs/kraken-js — pull request #314 by totherik (2014-12-09 21:41:09+00:00)
Title: Add better support for application composition.

Merely `use`-ing express applications is practical, but doesn't quite go far enough in ensuring application settings are correctly inherited from the parent application. This PR:

- Allows express' built-in prototypical inheritance of settings to continue to be used.
- Changes how kraken handles express application configuration such that existing express settings are preserved and only specified settings are overridden. (Previously kraken replaces express settings.)
- Removes many redundant express setting overrides from default kraken config to allow express to add or remove settings without them having to be tracked here. (Also allows express to continue to establish defaults).
- Add support for optionally inheriting view configuration (via `options.inheritViews`) from the parent app.
- Supports:
- kraken apps to be mounted on kraken apps
- non-kraken apps to be mounted on kraken apps
- kraken apps to be mounted on non-kraken apps

NOTE: This change *should* be backward compatible, and once merged to `v1.0.x` can be merged into master.