hapi-repl

1.0.1 • Public • Published

Hapi.js REPL plugin

Installation

$ npm install --save-dev hapi-repl

Note that you should not use this plugin in production !

After installing just add it into your Hapi.js

'use strict'

const replPlugin = require('./index')
const Hapi = require('hapi')

// Create a server with a host and port
const server = new Hapi.Server()
server.connection({host: 'localhost', port: 8000})

server.register([replPlugin], (err) => {
  if (err)
    throw err

  // Start the server
  server.start((err) => {
    if (err)
      throw err
  })
})

After starting app it will start your repl automatically

Readme

Keywords

Package Sidebar

Install

npm i hapi-repl

Weekly Downloads

65

Version

1.0.1

License

MIT

Last publish

Collaborators

  • kos