Open
Description
- add packages/middleware,package name:
ssr-middleware
- add koa/koa middlwares
example
const conf = require('./config/config.ssr')
const ssr = require('egg-react-ssr').koa(conf);
const Koa = require('koa');
const app = new Koa();
// mount routes from config
app.use(ssr)
// ctx.ssrRender()
app.use(async ctx => {
ctx.ssrRender(...);
});
app.listen(3000);