How to get user's ip address in JavaScript

An IP address is a unique numerical label given to a computer when connected to a network; is a free service that retrieves IP addresses in JSON format

.then(response => response.json())
.then(response => console.log(JSON.stringify(response)))

// response

In nodejs you can use a package node-fetch

Install it by typing;

npm i node-fetch

Or using curl, in your terminal type;

curl ''

// response


Popular posts from this blog

How to set content disposition header for nginx server to force content download

Animated daylight on HTML5 Canvas

How to make a static http server in nodejs using express

How to make a Snake Game using JavaScript and html5

JS13K Preparation