I tried to get IP address of clients system who is using my website through java script and failed.I didn't want to use third parties such as "https://jsonip.com/" to retrieve this information.I know it is possible with Node.js and tried it but failed since this code it is not running.
var express = require('express');
var app = express();
var http = require('http');
app.post('/testurl', function(req, res) {
console.log(req.connection.remoteAddress);
});
Please help me.