1.0.0 • Published 9 years ago
@rill/expose v1.0.0
Rill middleware to attach each request on the window for easier debugging.
Installation
npm install @rill/exposeExample
const app = require('rill')()
const expose = require('@rill/expose')
// Setup the middleware.
app.use(expose())
// Optionally change the namespace for the global variable used.
app.use(expose('mycontext'))Later in the console
window.ctx.req.href // -> https://...
window.ctx.req.query // -> {...}
window.ctx.locals // -> {...}Contributions
- Use
npm testto run tests.
Please feel free to create a PR!
1.0.0
9 years ago