17 lines
346 B
TypeScript
17 lines
346 B
TypeScript
import { BootstrapConsole } from 'nestjs-console';
|
|
import { AppModule } from './app.module';
|
|
|
|
const bootstrap = new BootstrapConsole({
|
|
module: AppModule,
|
|
useDecorators: true,
|
|
});
|
|
bootstrap.init().then(async (app) => {
|
|
try {
|
|
await app.init();
|
|
await bootstrap.boot();
|
|
process.exit(0);
|
|
} catch (e) {
|
|
process.exit(1);
|
|
}
|
|
});
|