import 'reflect-metadata'; import { NestFactory } from '@nestjs/core'; import { AppModule } from '../app.module'; import { BootstrapAdminService } from '../users/bootstrap-admin.service'; async function main(): Promise { const app = await NestFactory.createApplicationContext(AppModule, { logger: false }); try { const publicId = await app.get(BootstrapAdminService).createInitialAdmin(); process.stdout.write(`Initial administrator created: ${publicId}\n`); } finally { await app.close(); } } void main();