Add IP address

This commit is contained in:
Fred Boniface 2022-12-24 20:30:56 +00:00
parent 2e10bb93c2
commit ea43a9e371

2
app.js
View File

@ -8,7 +8,7 @@ const instanceNumber = Math.floor(Math.random() * 101);
const app = express();
app.get('/', (req, res) => {
res.send(`node-test instance ${instanceNumber}`);
res.send(`node-test instance ${instanceNumber}, your IP: ${req.ip}`);
});
app.listen(PORT, HOST, () => {