In this tutorial, we are going to look at how to test your application having Blockonomics APIs before deploying it on the cloud. We are going to use a reverse proxy to expose a specific port of our local machine on a public network. These will allow anyone on the internet to have a look at your application and also helps you to perform testing.
There are various vendors out there each having their own tradeoffs, some are open source too. Some of them are listed below –
Today, we are going to look at ngrok.
You can download ngrok from their official website. Once you download it, unzip the folder.
Open up the terminal inside the unzipped folder. You can also add it to your PATH to have access from your terminal irrespective of your current location inside the terminal. The next step is to run the command –
ngrok http 8000
8000 is the port number and you can change it to any port on which your application server is running. Once you complete it, you will be able to see a public URL on your terminal which can be shared.
HTTP CallBack URL
To complete the testing setup, you have to replace the HTTP Callback URL of your store with this new public URL, and do not forget to append your route. So let us say you receive your public URL from ngrok as
https://ngrok-demo-url.ngrok.io and your route for HTTP CallBack URL is
/callbacks/store_01. Then you have to enter your HTTP CallBack URL as
Now your setup is ready for testing and it should work!