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:
commit
a7458587f6
@ -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',
|
||||||
|
@ -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",
|
||||||
|
Loading…
Reference in New Issue
Block a user