Speed up development with full-stack environments for every branch.

Learn More

Express Clien IP [Node.js and Client]

Forked from Hello World in Express.

18 Runs 39 Views 5 Copies
Saved

Saved

norbertscehura 1

norbertscehura
published 5 months ago

var express = require('express');
var app = express();

app.get('/', function(req, res) {
  var ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress;
  res.send('Your ip: ' + ip);
});

app.listen(80);
Please login/signup to get access to the terminal.

Your session has timed out.

Dismiss (the page may not function properly).