Start creating Jobs in 5 minutes in your Next.js project.
Need to create a new Next.js project to add Trigger.dev to?
create-next-app
command in your terminal then continue with this quickstart guide as normal:DEV
SERVER API key.
dev
command allows the Trigger.dev service to send messages to your site. This is required for registering Jobs, triggering them and running tasks. To achieve this it creates a tunnel (using ngrok) so Trigger.dev can send messages to your machine.You should leave the dev
command running when you're developing.In a new terminal window or tab run:--port 3001
to the end.Experiencing an error? This could be due to middleware.
Advanced: Run your Next.js server together with the CLI
package.json
to run both the Next.js server and the CLI dev
command together.concurrently
package:package.json
file’s dev
script.src/jobs/examples.(ts/js)
or jobs/examples.(ts/js)
.In there is this Job: