diff --git a/lib/routes/index.js b/lib/routes/index.js index 7e6290ee50..a3d938856b 100644 --- a/lib/routes/index.js +++ b/lib/routes/index.js @@ -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', diff --git a/package.json b/package.json index 76989de5ec..6358face52 100644 --- a/package.json +++ b/package.json @@ -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",