I am looking for a way to replicate the jQuery getJSON method, but on the server side. The server I use is a node.js server with a pronounced framework written in coffeescript.
I have a client side:
# To get the client IP $.getJSON("http://jsonip.com?callback=?", (data) ->
The fulldata variable gives me information about the client's IP address.
I need to avoid using the client side of JavaScript, so I try to make the same server side, I get the client IP:
(req, res) ->
But after that, I have no idea how to get fulldata in json from the freegeoip.net server.
Help someone?
brnrd source share