michangarrito/apps/backend/dist/main.js
rckrdmrd 48dea7a5d0 feat: Initial commit - michangarrito
Marketplace móvil para negocios locales mexicanos.

Estructura inicial:
- apps/backend (NestJS API)
- apps/frontend (React Web)
- apps/mobile (Expo/React Native)
- apps/mcp-server (Claude MCP Server)
- apps/whatsapp-service (WhatsApp Business API)
- database/ (PostgreSQL DDL)
- docs/ (Documentación)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 04:41:02 -06:00

64 lines
3.1 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@nestjs/core");
const common_1 = require("@nestjs/common");
const config_1 = require("@nestjs/config");
const swagger_1 = require("@nestjs/swagger");
const helmet_1 = require("helmet");
const app_module_1 = require("./app.module");
async function bootstrap() {
const app = await core_1.NestFactory.create(app_module_1.AppModule);
const configService = app.get(config_1.ConfigService);
app.use((0, helmet_1.default)());
app.enableCors({
origin: configService.get('CORS_ORIGIN', 'http://localhost:3140'),
credentials: true,
});
app.setGlobalPrefix('api');
app.useGlobalPipes(new common_1.ValidationPipe({
whitelist: true,
forbidNonWhitelisted: true,
transform: true,
transformOptions: {
enableImplicitConversion: true,
},
}));
const config = new swagger_1.DocumentBuilder()
.setTitle('MiChangarrito API')
.setDescription('POS inteligente para micro-negocios con integración WhatsApp y LLM. Target: Changarros, tienditas, fondas.')
.setVersion('1.0')
.addBearerAuth()
.addTag('auth', 'Autenticación y registro')
.addTag('products', 'Gestión de productos')
.addTag('categories', 'Categorías de productos')
.addTag('sales', 'Ventas y tickets')
.addTag('inventory', 'Control de inventario')
.addTag('customers', 'Clientes y fiados')
.addTag('orders', 'Pedidos por WhatsApp')
.addTag('payments', 'Métodos de pago')
.addTag('subscriptions', 'Planes y tokens')
.addTag('messaging', 'WhatsApp y notificaciones')
.addTag('reports', 'Reportes y analytics')
.build();
const document = swagger_1.SwaggerModule.createDocument(app, config);
swagger_1.SwaggerModule.setup('docs', app, document, {
swaggerOptions: {
persistAuthorization: true,
},
});
const port = configService.get('PORT', 3000);
await app.listen(port);
console.log(`
╔══════════════════════════════════════════════════════════════╗
║ MICHANGARRITO API ║
║ POS Inteligente para Micro-Negocios ║
╠══════════════════════════════════════════════════════════════╣
║ Status: Running ║
║ Port: ${port}
║ Environment: ${configService.get('NODE_ENV', 'development')}
║ Docs: http://localhost:${port}/docs ║
╚══════════════════════════════════════════════════════════════╝
`);
}
bootstrap();
//# sourceMappingURL=main.js.map