katoikia-app/api-gateway/src/main.ts

14 lines
389 B
TypeScript
Raw Normal View History

2022-06-29 02:30:10 +00:00
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
2022-07-19 04:33:30 +00:00
const cors = require('cors');
2022-06-29 02:30:10 +00:00
async function bootstrap() {
const app = await NestFactory.create(AppModule);
2022-07-19 04:33:30 +00:00
app.enableCors({
origin: 'http://localhost:3000',
methods: 'GET, PUT, POST, DELETE',
allowedHeaders: 'Content-Type, Authorization',
});
await app.listen(4000);
2022-06-29 02:30:10 +00:00
}
bootstrap();