feat: foundation — Docker Compose, OTEL, shared types (#65)

Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #65.
This commit is contained in:
2026-03-13 01:55:33 +00:00
committed by jason.woltje
parent f6f05cf23a
commit 35e4e2e527
14 changed files with 2055 additions and 26 deletions

View File

@@ -1,16 +1,21 @@
import './tracing.js';
import 'reflect-metadata';
import { NestFactory } from '@nestjs/core';
import { Logger } from '@nestjs/common';
import { FastifyAdapter, type NestFastifyApplication } from '@nestjs/platform-fastify';
import { AppModule } from './app.module.js';
async function bootstrap(): Promise<void> {
const logger = new Logger('Bootstrap');
const app = await NestFactory.create<NestFastifyApplication>(AppModule, new FastifyAdapter());
await app.listen(4000, '0.0.0.0');
console.log('Gateway listening on port 4000');
const port = process.env['GATEWAY_PORT'] ?? 4000;
await app.listen(port as number, '0.0.0.0');
logger.log(`Gateway listening on port ${port}`);
}
bootstrap().catch((err: unknown) => {
console.error(err);
const logger = new Logger('Bootstrap');
logger.error('Fatal startup error', err instanceof Error ? err.stack : String(err));
process.exit(1);
});