When npx @trigger.dev/cli@latest init is run it generates the Trigger API route, and an example job.
In the Trigger API route (app/api/trigger.route.ts for app router and pages/api/trigger.ts for pages router) it imports an individual example job:
import { createAppRoute } from "@trigger.dev/nextjs";
import { client } from "@/trigger";
// Replace this with your own jobs
import "@/jobs/examples";
//this route is used to send and receive data with Trigger.dev
export const { POST, dynamic } = createAppRoute(client);
Let's change it so we have an index file inside the jobs folder and just that is imported here.
In that index file we would import the examples file.
From SyncLinear.com | TRI-768