npm install expressnpm install request- Edit the file so that
API_HOSTis the true host of your selected API. node node-http-relay.js- Send your requests to as instructed by the API, but replacing the API host with
http://localhost:3000.
e.g., If you are relaying to the Steam API, set:
var API_HOST = "http://api.steampowered.com";
Then, instead of:
http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=YOUR_STEAM_API_KEY&steamids=12345_ACTUAL_STEAM_ID_12345
...use:
http://localhost:3000/ISteamUser/GetPlayerSummaries/v0002/?key=YOUR_STEAM_API_KEY&steamids=12345_ACTUAL_STEAM_ID_12345