beforeListen was removed in 0.17 #907
-
|
I used the beforeListen to initialize some stuff like TypeORM => https://typeorm.io/docs/getting-started/#creating-a-new-datasource // app.config.ts
beforeListen: async () => {
// Initialize TypeORM
await AppDataSource.initialize();
},What is now the best practice? Simply call it in the app.config.ts ...? |
Beta Was this translation helpful? Give feedback.
Answered by
endel
Jan 28, 2026
Replies: 1 comment
-
|
Hi @thedomeffm, thank you for upgrading early and for the feedback - just added const server = defineServer({
// ...
beforeListen: async () => {/*...*/}
});Please let me know if you have any other issues |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
thedomeffm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @thedomeffm, thank you for upgrading early and for the feedback - just added
beforeListen()as option todefineServer()now, you can use it like this:Please let me know if you have any other issues