ohmyform-api/src/cli.ts
2021-05-02 12:43:54 +02:00

17 lines
344 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);
}
});