hapi-version-route
v1.1.0
Published
Exposes server version through a route for a hapi server
Downloads
2
Readme
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.
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