1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

Include module version number in /api reponse

This commit is contained in:
Ivar 2017-09-07 21:21:30 +02:00 committed by Ivar Conradi Østhus
parent 6bc23f04da
commit d58289540c
2 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,7 @@
'use strict';
const { Router } = require('express');
const version = require('project-version');
const adminApi = require('./admin-api');
const clientApi = require('./client-api');
@ -17,7 +18,8 @@ exports.router = function(config) {
router.get('/api', (req, res) => {
res.json({
version: 2,
name: 'unleash-server',
version,
links: {
admin: {
uri: '/api/admin',

View File

@ -73,6 +73,7 @@
"moment": "^2.15.2",
"parse-database-url": "^0.3.0",
"pg": "^6.4.2",
"project-version": "^1.0.0",
"prom-client": "^10.0.4",
"prometheus-gc-stats": "^0.5.0",
"response-time": "^2.3.2",