mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
9 lines
296 B
JavaScript
9 lines
296 B
JavaScript
const pathWrapper = (app, pathName, opts) => ({ raw, query }, hapiReply) =>
|
|
app.renderToHTML(raw.req, raw.res, pathName, query, opts)
|
|
.then(hapiReply)
|
|
|
|
const defaultHandlerWrapper = app => ({ raw }, hapiReply) =>
|
|
app.run(raw.req, raw.res)
|
|
|
|
module.exports = { pathWrapper, defaultHandlerWrapper }
|