You can use req.connection.remoteAddress to a user's IP address in node js.

BY Best Interview Question ON 22 Apr 2019