Skip to content

Commit

Permalink
HTTP Server: add version endpoint to get the current version (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
AgnesToulet authored Jun 7, 2021
1 parent b05fff8 commit 33a53b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/service/http-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ export class HttpServer {
this.app.get('/', (req: express.Request, res: express.Response) => {
res.send('Grafana Image Renderer');
});
this.app.get('/render/version', (req: express.Request, res: express.Response) => {
const pluginInfo = require('../../plugin.json');
res.send({ version: pluginInfo.info.version });
});

this.app.get('/render', asyncMiddleware(this.render));
this.app.get('/render/csv', asyncMiddleware(this.renderCSV));
Expand Down

0 comments on commit 33a53b0

Please sign in to comment.