cf13fbdf32
* Add triggerAndWait().unwrap() to more easily get at the output or throw the subtask error * Add taskId and runId to SubtaskUnwrapError * WIP docs update beta -> latest * trigger.dev init now adds @trigger.dev/build to devDependencies * How it works doc * Restructure some docs and update the cli commands * Config file docs, plus aptGet and ffmpeg extensions * Update to latest from beta docs * Add runtime to templates * Add --runtime option to the init CLI command * A bunch more doc updates after feedback * Document triggerAndWait with unwrap and result types * beta -> latest in the webapp * CLI update check no longer references beta * Add major release * Leave changeset beta, back to normal package release * Fixed default dirs option in init command * exclude windows-yarn variation of cli e2e tests because it’s buggy * Remove cache to try and fix yarn e2e test workflow errors
83 lines
2.4 KiB
Plaintext
83 lines
2.4 KiB
Plaintext
This runs a server on your machine that can execute Trigger.dev tasks:
|
|
|
|
<CodeGroup>
|
|
|
|
```bash npm
|
|
npx trigger.dev@latest dev
|
|
```
|
|
|
|
```bash pnpm
|
|
pnpm dlx trigger.dev@latest dev
|
|
```
|
|
|
|
```bash yarn
|
|
yarn dlx trigger.dev@latest dev
|
|
```
|
|
|
|
</CodeGroup>
|
|
|
|
It will first perform an update check to prevent version mismatches, failed deploys, and other errors. You will always be prompted first.
|
|
|
|
You will see in the terminal that the server is running and listening for tasks. When you run a task, you will see it in the terminal along with a link to view it in the dashboard.
|
|
|
|
It is worth noting that each task runs in a separate Node process. This means that if you have a long-running task, it will not block other tasks from running.
|
|
|
|
## Options
|
|
|
|
<ParamField body="Config file" type="--config | -c">
|
|
The name of the config file, found at [path].
|
|
</ParamField>
|
|
|
|
<ParamField body="Project ref" type="--project-ref | -p">
|
|
The project ref. Required if there is no config file.
|
|
</ParamField>
|
|
|
|
<ParamField body="Env file" type="--env">
|
|
Pass a custom path to an env file. We automatically detect `.env`, `.env.local`,
|
|
`.env.development`, and `.env.development.local` files.
|
|
</ParamField>
|
|
|
|
<ParamField body="Skip update check" type="--skip-update-check">
|
|
Skip checking for `@trigger.dev` package updates.
|
|
</ParamField>
|
|
|
|
<ParamField body="Login profile" type="--profile">
|
|
The login profile to use. Defaults to `default`.
|
|
</ParamField>
|
|
|
|
<ParamField body="API URL" type="--api-url | -a">
|
|
Override the API URL. Defaults to `https://api.trigger.dev`.
|
|
</ParamField>
|
|
|
|
<ParamField body="Log level" type="--log-level | -l">
|
|
The CLI log level to use. Options are `debug`, `info`, `log`, `warn`, `error`, and `none`. This
|
|
does not affect the log level of your trigger.dev tasks. Defaults to `log`.
|
|
</ParamField>
|
|
|
|
## Standard options
|
|
|
|
<ParamField body="Help" type="--help | -h">
|
|
Shows the help information for the command.
|
|
</ParamField>
|
|
|
|
## Concurrently running the terminal
|
|
|
|
Install the concurrently package as a dev dependency:
|
|
|
|
```ts
|
|
concurrently --raw --kill-others npm:dev:remix npm:dev:trigger
|
|
```
|
|
|
|
Then add something like this in your package.json scripts:
|
|
|
|
```json
|
|
"scripts": {
|
|
"dev": "concurrently --raw --kill-others npm:dev:*",
|
|
"dev:trigger": "npx trigger.dev@latest dev",
|
|
// Add your framework-specific dev script here, for example:
|
|
// "dev:next": "next dev",
|
|
// "dev:remix": "remix dev",
|
|
//...
|
|
}
|
|
```
|