mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
The application module we pass to repl may have long-running phases (e.g. database connection polling) and if we don't finish those long-running phases the repl would stuck on exit possibly forever. I encoutered this issue while using MikroORM.forRoot module. The solution is to call `app.close()` when repl exits. Modules should implement graceful shutdown using lifecycle hooks.