riot-ssr-middleware

0.0.3 • Public • Published

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: { ... }
})))

Package Sidebar

Install

npm i riot-ssr-middleware

Weekly Downloads

3

Version

0.0.3

License

ISC

Last publish

Collaborators

  • ilearnio