mindmount/dist/main.js
2026-09-11 23:30:20 -04:00

29 lines
No EOL
1.2 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("reflect-metadata");
const core_1 = require("@nestjs/core");
const swagger_1 = require("@nestjs/swagger");
const app_module_1 = require("./app.module");
async function bootstrap() {
const app = await core_1.NestFactory.create(app_module_1.AppModule);
app.enableShutdownHooks();
app.enableCors();
const config = new swagger_1.DocumentBuilder()
.setTitle('mindmount')
.setDescription('MindMount is a proxy service for GapMind and SocMind. It\'s a unified API gateway for IP and social intelligence services.')
.setVersion('1.0.0')
.addBearerAuth()
.addTag('Mount', 'Router status')
.build();
const document = swagger_1.SwaggerModule.createDocument(app, config);
swagger_1.SwaggerModule.setup('/', app, document);
app.getHttpServer().on('request', (req, res) => {
if (req.url === '/api/openapi.json' && req.method === 'GET') {
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify(document));
}
});
await app.listen(process.env.PORT || 3000);
}
bootstrap();
//# sourceMappingURL=main.js.map