riot-ssr-middleware
v0.0.3
Published
riot-ssr wrapped into Express-compatible middleware for convenience
Downloads
3
Maintainers
Readme
riot-ssr-middleware
riot-ssr wrapped into an Express-compatible middleware for convenience.
Installation
npm i -S riot-ssr-middleware
Usage
const riotRenderMiddleware = require('riot-ssr-middleware')
router.use(riotRenderMiddleware({
path: '/path/to.tag',
opts: { ... }
}))
or pass it properties from req
or res
:
router.use(riotRenderMiddleware((req, res) => ({
path: req.pathToTag,
opts: { ... }
})))