1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00

Merge pull request #263 from Unleash/expose-version

Include module version number in /api reponse
This commit is contained in:
Ivar Conradi Østhus 2017-09-09 16:35:34 +02:00 committed by GitHub
commit a7458587f6
2 changed files with 4 additions and 1 deletions

View File

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

View File

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