Initial LisgloSIPS V2 implementation

This commit is contained in:
hectorzhao
2026-06-22 10:56:38 +08:00
commit 5fa1bd35e9
303 changed files with 35644 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
import 'reflect-metadata';
import helmet from '@fastify/helmet';
import { NestFactory } from '@nestjs/core';
import { FastifyAdapter, type NestFastifyApplication } from '@nestjs/platform-fastify';
import { Logger } from 'nestjs-pino';
import { AppModule } from './modules/app.module.js';
import { buildOpenApiDocument } from './openapi.js';
async function bootstrap(): Promise<void> {
const app = await NestFactory.create<NestFastifyApplication>(
AppModule,
new FastifyAdapter({
trustProxy: true,
logger: false
}),
{
bufferLogs: true
}
);
app.useLogger(app.get(Logger));
app.setGlobalPrefix('api/v2');
await app.register(helmet, {
contentSecurityPolicy: false
});
buildOpenApiDocument(app);
const host = process.env.LISGLOSIPS_HOST ?? '127.0.0.1';
const port = Number(process.env.LISGLOSIPS_PORT ?? 3000);
await app.listen({ host, port });
}
void bootstrap();