1.0.0 • Published 6 years ago
renderhare v1.0.0
renderhare
Express / Connect middleware for server-side rendering with RenderHare.
Install
Available on npm:
npm install renderhare --save
Or using yarn:
yarn add renderhare
Use
This package can be used as Express middleware like so:
const renderhare = require('renderhare');
const app = require('express')();
// A lot of other important stuff
app.use(renderhare({
token: 'YOUR TOKEN HERE'
}));
app.listen(8080);
Options
The following options are provided, only token
is required:
token
Your API token, which you can find here. A token is required to render with RenderHare.
bypass
A boolean, if true bypass signals to not use RenderHare. You might use this in a development or testing environment.
app.use(renderhare({
token: 'YOUR TOKEN HERE',
bypass: process.env.NODE_ENV === 'testing'
}))
License
MIT
1.0.0
6 years ago