hapi-nuxt
IMPORTANT: This plugin is compatible with Hapi >= 17
Quick start
Install plugin:
yarn add hapi-nuxt # or npm install hapi-nuxt
Register it on your server:
const Hapi = const nuxtPlugin = await server
Options
dev
- Default:
true
(false
when environment variableNODE_ENV
isproduction
)
Automatically starts a Builder
allow to hot reload on dev. Should be disabled for production.
rootDir
- Default: current working directory
nuxtConfig
- Default:
nuxt.config.js
Resolved relative to rootDir
edge
- Default:
false
Use nuxt-edge
instead of nuxt
package if set to true
baseURL
- Default:
/
baseURL for SSR route handler
route
- Default:
{ id: 'nuxt.render', auth: false }
Hapi route options for SSR handler
routeMethod
- Default:
*
Hapi route method. (Can be set to GET
for more strict handling)
nuxt
and builder
instances
Access This plugin exposes nuxt and builder (for dev only) instances to hapi.
server = await server // Access to nuxt and builder instances using server.plugins.nuxtconst nuxt builder = serverpluginsnuxt
License
MIT