"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const contracts_1 = require("@teachagenthub/contracts");
require("reflect-metadata");
const common_1 = require("@nestjs/common");
const core_1 = require("@nestjs/core");
const swagger_1 = require("@nestjs/swagger");
const contracts_2 = require("@teachagenthub/contracts");
const app_module_1 = require("./app.module");
async function bootstrap() {
    const app = await core_1.NestFactory.create(app_module_1.AppModule);
    const logger = new common_1.Logger('HTTP-SkillRepoService');
    app.use((0, contracts_2.createHttpLoggingMiddleware)('HTTP-SkillRepoService', (message) => logger.log(message)));
    app.enableCors();
    app.setGlobalPrefix('internal/v1');
    const swaggerConfig = new swagger_1.DocumentBuilder()
        .setTitle('TeachAgentHub Skill Repo Service API')
        .setDescription('Internal APIs for cloud skill repository')
        .setVersion('1.0.0')
        .build();
    const swaggerDoc = swagger_1.SwaggerModule.createDocument(app, swaggerConfig);
    swagger_1.SwaggerModule.setup('docs', app, swaggerDoc);
    await app.listen(contracts_1.APP_CONFIG.SKILL_REPO_SERVICE_PORT ?? 3010);
}
void bootstrap();
//# sourceMappingURL=main.js.map