I'm using Elastic-Beanstalk to deploy my web server to multiple instances.
I configured an endpoint /version
which I'd like the server to tell me which version it runs and hopefully from which instance I was handled (to validate that the LB works as expected for instance).
I would like something like this to work:
app.get('/version', function (req, res) {
var instance = getInstanceInfo();
res.end(instance + 'v0.0.2');
});
How would getInstanceInfo()
look like?
Thanks