12 lines
379 B
TypeScript
12 lines
379 B
TypeScript
import { NestFactory } from '@nestjs/core';
|
|
import { AppModule } from './app.module';
|
|
import { JwtMiddleware } from './middleware/jwtMiddleware';
|
|
|
|
async function bootstrap() {
|
|
const app = await NestFactory.create(AppModule);
|
|
app.enableCors({ origin: 'http://localhost:3001' });
|
|
app.use(new JwtMiddleware().use);
|
|
await app.listen(process.env.PORT ?? 3000);
|
|
}
|
|
bootstrap();
|