This repository was archived by the owner on Apr 16, 2019. It is now read-only.
Release v0.5.9
- using
express-stateto augment the express app - making
exposemiddleware connect/express compatible
// using it for a mounted middleware
app.use(yui.expose());
// or using it as a route middleware
app.get('/foo', yui.expose());
- adding
debugmiddleware to control it per request
// exposing yui into the client side thru `state` object
app.use(yui.expose());
// using yui in debug mode when node runs in debug mode with custom filter
if (app.get('env') === 'development') {
app.use(yui.debug({filter: 'raw'}));
}
Note: the debug() middleware only works if it is called after the regular expose() middleware was called, otherwise it will not be able to overrule the default yui config for the app.
Deprecation
app.yui.debugMode()method is now deprecated in favor of a middleware that can set up the debug mode per request thruexpyui.debug().