Get User Location by IP Address – JavaScript Tutorial

preview_player
Показать описание

How to get a location of a user by their IP address using frontend JavaScript and NodeJS.
#javascript #nodejs #webdevelopment #javascript_tutorial

⚡ NEW: Web development courses from Meta Inc. ⚡

Рекомендации по теме
Комментарии
Автор


Also, I made slight boo boo in this video: the ip.address() method actually returns the IP address of the hosting server, not the incoming request!

The good news is that you CAN determine the IP of an incoming request vanilla by calling req.socket.remoteAddress inside the server code on the incoming request. No need for the IP package!

OpenJavaScript
Автор

so how do i make it so whenever they log on to my website i get the ip instead of it being local host 3000

ConstantineFortuna-tzyh
Автор

2:41 - That's your server IP, not your actual IP address.

OscarA-cl
Автор

If I put this on my website will not appear the message "fraudulent website" or some other security message?

diogosantos
join shbcf.ru