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',
|
|
|
|
});
|
2022-07-15 00:46:07 +00:00
|
|
|
await app.listen(4000);
|
2022-06-29 02:30:10 +00:00
|
|
|
}
|
|
|
|
bootstrap();
|