QStash requires a publicly available API to send messages to. If you want to develop locally, you need to run a tunnel. We are planning to offer a native solution, but for the moment please use a 3rd party tunnel.
ngrok is a free service, that provides you with a public endpoint and forwards all traffic to your localhost.
Create a new account on dashboard.ngrok.com/signup and follow the instructions to download the ngrok CLI and connect your account:
Choose the port where your application is running. Here I’m forwarding to port 3000, because Next.js is using it.
Now copy the Forwarding
url and use it as destination in QStash. Make sure to
add the path of your API at the end. (/api/webhooks
in this case)
In case messages are not delivered or something else doesn’t work as expected, you can go to http://127.0.0.1:4040 to see what ngrok is doing.
QStash requires a publicly available API to send messages to. If you want to develop locally, you need to run a tunnel. We are planning to offer a native solution, but for the moment please use a 3rd party tunnel.
ngrok is a free service, that provides you with a public endpoint and forwards all traffic to your localhost.
Create a new account on dashboard.ngrok.com/signup and follow the instructions to download the ngrok CLI and connect your account:
Choose the port where your application is running. Here I’m forwarding to port 3000, because Next.js is using it.
Now copy the Forwarding
url and use it as destination in QStash. Make sure to
add the path of your API at the end. (/api/webhooks
in this case)
In case messages are not delivered or something else doesn’t work as expected, you can go to http://127.0.0.1:4040 to see what ngrok is doing.