NGROK is a very useful developer tool for working with cloud based services, as it allows testing workflows where those services have to call back to your machine. With NGROK, you can create a temporary public address to hit an endpoint on your machine, so say, a workflow in Pipedream.com could hit a GraphQL endpoint to make content updates.
NGROK now supports hitting local HTTPS endpoints, and through the use of configuration, allows you to define tunnets to multiple services on your PC. This is helpful so that you can expose both your CM and your ID endpoint.
To take advantage of this, when you register for NGROK, on the get-started page Setup - ngrok, make sure to run the "ngrok config add-authtoken <value>" to enable advanced features.
Then go to $env:LOCALAPPSETTINGS\ngrok\ngrok.yml and add something like this (for XM1 configuration):
tunnels:
cm:
proto: http
addr: https://xm1cm.localhost
host_header: rewrite
cd:
proto: http
addr: https://xm1cd.localhost
host_header: rewrite
id:
proto: http
addr: https://xm1id.localhost
host_header: rewrite
>ngrok.exe start cm cd id
Three tunnels will be created, and the URLs will be accessible on your command prompt:
And at NGROK Endpoints - ngrok:
Once you hit Control-C on the prompt where you are running NGROK, those URLs go away, and new ones will be generated for you the next time. (You can keep them on the paid plan.)
No comments:
Post a Comment