ToolJet/server/scripts/seeds.ts

27 lines
1,018 B
TypeScript
Raw Normal View History

2025-02-25 06:52:50 +00:00
// import { NestFactory } from '@nestjs/core';
// import { AppModule } from '../src/app.module';
// import { SeedsService } from '@services/seeds.service';
// import { Organization } from 'src/entities/organization.entity';
// import { OrganizationsService } from '@services/organizations.service';
2021-08-03 04:11:39 +00:00
2025-02-25 06:52:50 +00:00
// async function bootstrap() {
// const app = await NestFactory.create(AppModule, {
// logger: ['error', 'warn'],
// });
// const seedsService = app.get(SeedsService);
// const organizationService = app.get(OrganizationsService);
2021-08-03 04:11:39 +00:00
2025-02-25 06:52:50 +00:00
// await seedsService.perform();
// const organizations: Organization[] = await seedsService.getAllOrganizations();
// for (const org of organizations) {
// await organizationService.createSampleDB(org.id);
// }
// await app.close();
// // TODO: process exit wasn't needed earlier
// // need to debug why app.close() doesn't exit gracefully
// process.exit(0);
// }
2021-08-03 04:11:39 +00:00
2025-02-25 06:52:50 +00:00
// // eslint-disable-next-line @typescript-eslint/no-floating-promises
// bootstrap();