Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sweep(slow): [TRI-768] The CLI init command should generate a jobs/index file and jobs should be imported there. #1

Open
Labels
sweepAssigns Sweep to an issue or pull request.
@wwzeng1

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    sweepAssigns Sweep to an issue or pull request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /