You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Setup project-wide prettier
* Remove old workspace file
* Remove old debugging directives
* New top-level .prettierignore
* Updated Prettier config settings
* Contrubuting guide: Fix for some bad code blocks
* Added more ignores
* Improved the format script command
* printWidth set to 100
* Formatted entire repo (pnpm run format)
2. Change directory to the packages/database folder
95
100
```sh
@@ -100,6 +105,7 @@ webapp:dev: If you didn't try to log in, you can safely ignore this email.`
100
105
```sh
101
106
pnpm run generate
102
107
```
108
+
103
109
The above updates the prisma client generated into node_modules/.prisma/client folder. This helps with typing of relevant prisma models. It ensures typescript
104
110
recognizes fields added or removed from a model and type-checks appropriately.
105
111
@@ -108,6 +114,7 @@ webapp:dev: If you didn't try to log in, you can safely ignore this email.`
108
114
```
109
115
pnpm run db:migrate:dev
110
116
```
117
+
111
118
This creates a migration file and executes the migrations against your database and applies changes to the database schema(s)
112
119
113
120
5. Commit generated migrations as well as changes to the schema.prisma file
@@ -119,44 +126,44 @@ To test CLI changes, follow the steps below:
119
126
120
127
1. Build the CLI and watch for changes
121
128
122
-
```
123
-
cd packages/cli
124
-
pnpm run dev
125
-
```
129
+
```sh
130
+
cd packages/cli
131
+
pnpm run dev
132
+
```
126
133
127
134
2. Open a new Terminal window and run the webapp locally and then create a new project in the dashboard. Copy out the dev API key.
128
135
129
136
3. Create a new temporary Next.js app in examples directory
130
137
131
-
```
132
-
pnpm create next-app@latest
133
-
```
138
+
```sh
139
+
pnpm create next-app@latest
140
+
```
134
141
135
-
Follow the prompts to create a TypeScript project using the App Directory.
142
+
Follow the prompts to create a TypeScript project using the App Directory.
136
143
137
144
4. Then once that's finished, add the `@trigger.dev/cli` to the `devDependencies` of the newly created Next.js app's `package.json` file, like so:
5. Open a new terminal window, navigate into the example, and initialize the CLI:
146
153
147
-
```
148
-
cd examples/your-newly-created-nextjs-project
149
-
pnpm i
150
-
pnpm exec trigger-cli init
151
-
```
154
+
```sh
155
+
cd examples/your-newly-created-nextjs-project
156
+
pnpm i
157
+
pnpm exec trigger-cli init
158
+
```
152
159
153
160
6. When prompted, select`self-hosted` and enter `localhost:3030`for your local version of the webapp. When asked for an API key, use the key you copied earlier.
154
161
155
162
7. Run the CLI
156
163
157
-
```
158
-
pnpm exec trigger-cli dev
159
-
```
164
+
```sh
165
+
pnpm exec trigger-cli dev
166
+
```
160
167
161
168
8. After running the CLI, start your newly created Next.js project. You should now be able to see the changes.
162
169
@@ -170,19 +177,19 @@ The [examples/jobs-starter](./examples/jobs-starter/) project defines simple job
170
177
2. Create a `.env.local` file with the following content,
171
178
replacing `[TRIGGER_DEV_API_KEY]` with an actual key:
172
179
173
-
```
174
-
TRIGGER_API_KEY=[TRIGGER_DEV_API_KEY]
175
-
TRIGGER_API_URL=http://localhost:3030
176
-
```
180
+
```env
181
+
TRIGGER_API_KEY=[TRIGGER_DEV_API_KEY]
182
+
TRIGGER_API_URL=http://localhost:3030
183
+
```
177
184
178
-
`TRIGGER_API_URL` is used to configure the URL for your Trigger.dev instance,
179
-
where the jobs will be registered.
185
+
`TRIGGER_API_URL` is used to configure the URL for your Trigger.dev instance,
186
+
where the jobs will be registered.
180
187
181
188
3. Run the `jobs-starter` app:
182
189
183
-
```
184
-
pnpm dev
185
-
```
190
+
```sh
191
+
pnpm dev
192
+
```
186
193
187
194
4. Navigate to your trigger.dev instance ([http://localhost:3030](http://localhost:3030/)), to see the jobs.
188
195
You can use the test feature to trigger them.
@@ -204,7 +211,7 @@ If you are contributing a change to any packages in this monorepo (anything in e
204
211
205
212
To add a changeset, run the following commandin the root of the repo
206
213
207
-
```shell
214
+
```sh
208
215
pnpm run changeset:add
209
216
```
210
217
@@ -221,15 +228,18 @@ Most of the time the changes you'll make are likely to be categorized as patch r
221
228
### EADDRINUSE: address already in use :::3030
222
229
223
230
When receiving the following error message:
224
-
`webapp:dev: Error: listen EADDRINUSE: address already in use :::3030`
231
+
232
+
```sh
233
+
webapp:dev: Error: listen EADDRINUSE: address already in use :::3030
234
+
```
225
235
226
236
The process running on port `3030` should be destroyed.
227
237
228
238
1. Get the `PID` of the process running on PORT `3030`
0 commit comments