nuxt-community/hapi-nuxt

Name: hapi-nuxt

Owner: Nuxt Community

Description: Nuxt plugin for Hapi.js

Created: 2017-02-05 08:52:34.0

Updated: 2018-05-20 17:05:50.0

Pushed: 2017-12-20 09:49:15.0

Homepage:

Size: 142

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

hapi-nuxt

npm npm release CircleCI Codecov Greenkeeper badge dependencies Status

Nuxt.js plugin for Hapi.js

IMPORTANT: Starting from 1.x versions, this plugin is only compatible with Hapi >= 17

Quick start

Install plugin:

 add hapi-nuxt # or npm install hapi-nuxt

Register it on your server:

t Hapi = require('hapi')
t HapiNuxt = require('hapi-nuxt')

..
er = new Hapi.Server()
t server.register(HapiNuxt)

By default this plugin tries to read nuxt.config.js from current directory and pass it as options. You can either provide a new path by setting options to an string value or directly passing options

t server.register({
plugin: HapiNuxt
options: {
    // Nuxt options       
}

If nuxt.options.dev (Automatically set by nuxt if not provided in options) is true plugin automatically starts a Builder allow to hot reload on dev. You can manually disable this behavior by using options.startOnly to true.

Access nuxt and builder instances

Plugin exposes nuxt and builder (for dev only) instances to hapi.

er = new Hapi.Server()

t server.register(HapiNuxt)

ccess to nuxt and builder instances using server.plugins.nuxt
t { nuxt, builder } = server.plugins.nuxt

License

MIT - Fandogh & Nuxt.js


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.