public-ip
Microservice based on node.js
Source:
https://github.com/zlatnaspirala/public-ip
NPM:
npm i
This is standalone app without any external microservice call. Service works on Node.js. You need to start it on public server and you will have your own microservice link.
Running microService format
node yourAppName.js <PROTOCOL> <PORT> <SSLPATH_PRIVATEKEY> <SSLPATH_CERT>
http
protocol
Running microservice publicIP on node test.js http 9999
https
protocol with your domain SSL
Running microservice publicIP on node test.js https 9999 "/etc/letsencrypt/live/maximumroulette.com/privkey.pem" "/etc/letsencrypt/live/maximumroulette.com/fullchain.pem"
Usage (test.js)
var myMicroService = require("./index.js");
myMicroService.publicIP.start();
On frontend just call route:
http://YOUT_DOMAIN:9999
Response [JSON]:
{"message":"Microservice publicIP - MIT Licence https://github.com/zlatnaspirala/public-ip 2021","ipaddress":"87.116.**.**"}
Take a look at: https://maximumroulette.com:9999