version-healthcheck
A plug-and-play /version route for the Node.js Express framework.
Useful for monitoring the health status of your application deploys.
It will deliver a JSON payload something like this:
{
"name": "my-app"
"version": "0.0.1"
"build": "4f26147"
}
- name: app name from package.json
- version: app version from package.json
- build: latest build # read from a generated file: APP_HOME/config/BUILD
I recommend using the included build script to use the latest git commit hash for ./config/BUILD
.
Getting started
$ npm install --save version-healthcheck
In your routes file:
var version = ; app;
You also have access to configure the response in any way you like:
var express = ;var configureVersion = configure; var app = ; var version = ; app;