import { NestFactory } from '@nestjs/core';
import express from 'express';
import { AppModule } from './app.module.js';

async function bootstrap() {
  const server = express();
  const app = await NestFactory.create(AppModule);
  app.setGlobalPrefix('bizmatch');
  app.enableCors({
    origin: '*',
    //origin: 'http://localhost:4200', // Die URL Ihrer Angular-App
    methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
    allowedHeaders: 'Content-Type, Accept, Authorization',
  });
  //origin: 'http://localhost:4200',
  await app.listen(3000);
}
bootstrap();
