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

Keywords

install

npm i hapi-version-route

Downloadsweekly downloads

1

version

1.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
Report a vulnerability