Skip to content

Commit f26049f

Browse files
committed
Use onStart instead of init for TypeORM
1 parent d5b3180 commit f26049f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/v3/trigger-config.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,15 @@ export const AppDataSource = new DataSource({
222222
});
223223
```
224224
225-
And then in your trigger.config.ts file you can initialize the datasource using the new `init` option:
225+
And then in your trigger.config.ts file you can initialize the datasource using the `onStart` lifecycle function option:
226226
227227
```ts trigger.config.ts
228228
import type { TriggerConfig } from "@trigger.dev/sdk/v3";
229229
import { AppDataSource } from "@/trigger/orm";
230230
231231
export const config: TriggerConfig = {
232232
// ... other options here
233-
init: async (payload, { ctx }) => {
233+
onStart: async (payload, { ctx }) => {
234234
await AppDataSource.initialize();
235235
},
236236
};

0 commit comments

Comments
 (0)