hapi-nextjs
A nextjs plugin for hapi
This plugin provides an easy way to add a custom hapi
server to a nextjs
project.
NOTE: There are currently no tests for this plugin.
Table of Contents
Install
npm install hapi-nextjs
Usage
const Hapi = const server = const dev = processenvNODE_ENV !== 'production'const port = const nextPlugin = register: options: dev serverserver
Details
- has a
peerDependency
onnext >= 2
, so bring your ownnext
- binds a catch-all route, so add your custom routes/plugins before registering
Options
- passes plugin
options
directly tonext
, in2.x
those options are:dev
(bool
) whether to launch Next.js in dev mode - defaultfalse
dir
(string
) where the Next project is located - default'.'
quiet
(bool
) Hide error messages containing server information - defaultfalse
Contribute
PRs welcome! Please read the contributing guidelines and the code of conduct.