Update nginx-nodejs-redis/web/server.js

Co-authored-by: Guillaume Lours <guillaume@lours.me>
This commit is contained in:
Ajeet Singh Raina, Docker Captain, ARM Innovator, RedisInc 2022-03-13 16:47:58 +05:30 committed by GitHub
parent 5a53fe5de5
commit d128c1e568
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ app.get('/', function(req, res) {
if (isNaN(numVisitsToDisplay)) { if (isNaN(numVisitsToDisplay)) {
numVisitsToDisplay = 1; numVisitsToDisplay = 1;
} }
res.send('Number of visits is: ' + numVisitsToDisplay); res.send(os.hostname() +': Number of visits is: ' + numVisitsToDisplay);
numVisits++; numVisits++;
redisClient.set('numVisits', numVisits); redisClient.set('numVisits', numVisits);
}); });