hapi-version-route

1.1.0 • Public • Published

hapi-version-route

Exposes package.json version through a version route for a hapi server.

Inspired by hapi university, and useful for version checking deployed servers, basic monitoring, smoke testing etc.

Circle CI

Requirements

Uses package.json variables to determine the server version so requires you run your server with npm start instead of node <script>.

Usage

Install

npm install --save hapi-version-route

Register plugin

server.register({
  register: require('hapi-version-route')
}, function(err) {
  ...
});

Consume

GET /version
{
  "version": "x.x.x"
}

Plugin options

path - register your own path, instead of /version auth - auth config for the route

Readme

Keywords

Package Sidebar

Install

npm i hapi-version-route

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • bigwednesdayio
  • brainsiq
  • toboid