Browse Source

Return version of server#66 (#76)

* Log server version on start-up

* remove empty lines

* move server version message to url status message
change server version to actual
pull/1/head
sanke1 6 years ago committed by Alexey Velikiy
parent
commit
b023611e0d
  1. 2
      server/package.json
  2. 4
      server/src/index.ts

2
server/package.json

@ -1,6 +1,6 @@
{ {
"name": "hastic-server", "name": "hastic-server",
"version": "1.0.0", "version": "0.1.4-alpha",
"description": "REST server for managing data for analytics", "description": "REST server for managing data for analytics",
"scripts": { "scripts": {
"start": "node dist/server.js", "start": "node dist/server.js",

4
server/src/index.ts

@ -34,7 +34,8 @@ rootRouter.get('/', async (ctx) => {
ctx.response.body = { ctx.response.body = {
server: 'Ok', server: 'Ok',
analyticsReady: AnalyticsController.isAnalyticReady() analyticsReady: AnalyticsController.isAnalyticReady(),
version: process.env.npm_package_version
}; };
}); });
@ -45,4 +46,3 @@ app
app.listen(HASTIC_PORT, () => { app.listen(HASTIC_PORT, () => {
console.log(`Server is running on :${HASTIC_PORT}`); console.log(`Server is running on :${HASTIC_PORT}`);
}); });

Loading…
Cancel
Save