28 lines
1.0 KiB
TypeScript
28 lines
1.0 KiB
TypeScript
import { NestFactory } from '@nestjs/core';
|
|
import { ValidationPipe } from '@nestjs/common';
|
|
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
|
import { AppModule } from './app.module';
|
|
|
|
async function bootstrap() {
|
|
const app = await NestFactory.create(AppModule);
|
|
app.useGlobalPipes(new ValidationPipe({ whitelist: true, transform: true }));
|
|
|
|
const config = new DocumentBuilder()
|
|
.setTitle('Genex Wallet Service')
|
|
.setDescription('MPC Wallet — User / Institutional / Governance wallet management')
|
|
.setVersion('1.0')
|
|
.addTag('mpc', 'MPC signing operations')
|
|
.addTag('user-wallet', 'User abstract wallet')
|
|
.addTag('institutional', 'Institutional wallet (issuers/market makers)')
|
|
.addTag('governance', 'Governance multi-sig wallet')
|
|
.build();
|
|
|
|
SwaggerModule.setup('docs', app, SwaggerModule.createDocument(app, config));
|
|
|
|
const port = process.env.PORT || 3021;
|
|
await app.listen(port);
|
|
console.log(`Wallet Service running on :${port} | Swagger: /docs`);
|
|
}
|
|
|
|
bootstrap();
|