21 lines
698 B
TypeScript
21 lines
698 B
TypeScript
import { NestFactory } from '@nestjs/core';
|
|
import bodyParser from 'body-parser';
|
|
import express from 'express';
|
|
import { AppModule } from './app.module.js';
|
|
|
|
async function bootstrap() {
|
|
const server = express();
|
|
const app = await NestFactory.create(AppModule);
|
|
app.use('/bizmatch/payment/webhook', bodyParser.raw({ type: 'application/json' }));
|
|
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, x-hide-loading',
|
|
});
|
|
//origin: 'http://localhost:4200',
|
|
await app.listen(3000);
|
|
}
|
|
bootstrap();
|