fastify-pigeon

0.2.1 • Public • Published

fastify-pigeon

js-standard-style Build Status Greenkeeper badge

If you need to compile (browserify style!) your code, this plugin is for you! Internally it uses bankai, so refer to its documentation for the options.

fastify-pigeon will automatically live-reload your HTML and regenerate your bundle whenever your code change. This can be disabled in test or in production.

Install

npm i fastify-pigeon --save

Usage

Simply require this plugin, pass the entry file and you are done!

const fastify = require('fastify')()
 
fastify.register(require('fastify-pigeon'), {
  entryFile: './client.js'
})
 
fastify.listen(3000, err => {
  if (err) throw err
  console.log('Server listenting on localhost:', fastify.server.address().port)
})

In tests or in production

If you are including fastify-pigeon in any test run or in production, you must disable the automatic watch mode:

const fastify = require('fastify')()
 
fastify.register(require('fastify-pigeon'), {
  entryFile: './client.js',
  options: {
    watch: false
  }
})
 
fastify.listen(3000, err => {
  if (err) throw err
  console.log('Server listenting on localhost:', fastify.server.address().port)
})

Options

  • entryFile: Your application entry point
  • baseURL: a custom url, default '/'
  • options: the options object for bankai

Acknowledgements

This project is kindly sponsored by:

License

Licensed under MIT.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.1
    0
  • 0.2.0
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i fastify-pigeon

Weekly Downloads

0

Version

0.2.1

License

MIT

Last publish

Collaborators

  • gurgunday
  • metcoder95
  • galvez
  • simenb
  • coopflow
  • simoneb
  • rafaelgss
  • starptech
  • delvedor
  • matteo.collina
  • allevo
  • jsumners
  • zekth
  • eomm
  • fox1t
  • airhorns
  • kibertoad
  • climba03003