mirror of
https://github.com/PeterMaquiran/tvone-api.git
synced 2026-04-18 16:27:51 +00:00
add login validation
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
app.enableCors({
|
||||
origin: ["http://localhost:3000"], // 👈 array is safer
|
||||
methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"],
|
||||
allowedHeaders: ["Content-Type", "Authorization"],
|
||||
credentials: true,
|
||||
});
|
||||
await app.listen(process.env.PORT ?? 3001);
|
||||
}
|
||||
bootstrap();
|
||||
Reference in New Issue
Block a user