A simple example to demonstrate Upstash QStash with Next.js. We will make a publish request through QStash and observe what's delivered.
This project is a simple example of how to use QStash with Next.js.
Routes in the project:
/api/edge
/api/receiver
/api/serverless
/edge
/serverless
'/publish' (app router)
On the landing page of the project, you will find an introduction to QStash. You can click a button to call the
/publish
npm install
Create a
.env.local
QSTASH_CURRENT_SIGNING_KEY=QSTASH_CURRENT_SIGNING_KEY_ID=
You can get these values from the Upstash Console.
npm run dev
To test the application, QStash needs to send requests to your local server. You can use a tool like ngrok to create a secure tunnel to your localhost.
ngrok http 3000
Copy the resulting url and. Go to the Upstash Console and send a simple request to
<ngrok-url>/api/receiver
A simple example to demonstrate Upstash QStash with Next.js. We will make a publish request through QStash and observe what's delivered.
This project is a simple example of how to use QStash with Next.js.
Routes in the project:
/api/edge
/api/receiver
/api/serverless
/edge
/serverless
'/publish' (app router)
On the landing page of the project, you will find an introduction to QStash. You can click a button to call the
/publish
npm install
Create a
.env.local
QSTASH_CURRENT_SIGNING_KEY=QSTASH_CURRENT_SIGNING_KEY_ID=
You can get these values from the Upstash Console.
npm run dev
To test the application, QStash needs to send requests to your local server. You can use a tool like ngrok to create a secure tunnel to your localhost.
ngrok http 3000
Copy the resulting url and. Go to the Upstash Console and send a simple request to
<ngrok-url>/api/receiver