feat(center-auth): implement register/login/refresh/logout with bcrypt and DTO validation
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'reflect-metadata';
|
||||
import { ValidationPipe } from '@nestjs/common';
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
@@ -26,6 +27,13 @@ async function bootstrap() {
|
||||
|
||||
const app = await NestFactory.create(AppModule);
|
||||
app.setGlobalPrefix('api');
|
||||
app.useGlobalPipes(
|
||||
new ValidationPipe({
|
||||
whitelist: true,
|
||||
forbidNonWhitelisted: true,
|
||||
transform: true,
|
||||
}),
|
||||
);
|
||||
const port = process.env.PORT ? Number(process.env.PORT) : 7001;
|
||||
await app.listen(port);
|
||||
console.log(`Fabric.Backend.Center listening on :${port}`);
|
||||
|
||||
Reference in New Issue
Block a user