BugFixes bzgl. Observables, Logging Anpassungen, Endpunkt hardening, dotenv-flow usage

This commit is contained in:
2024-09-20 13:49:50 +02:00
parent 205793faab
commit 3e84b82c92
25 changed files with 141 additions and 181 deletions

View File

@@ -1,14 +1,20 @@
import { LoggerService } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import bodyParser from 'body-parser';
import express from 'express';
import { WINSTON_MODULE_NEST_PROVIDER } from 'nest-winston';
import { AppModule } from './app.module';
async function bootstrap() {
const server = express();
server.set('trust proxy', true);
const app = await NestFactory.create(AppModule);
// const logger = app.get<Logger>(WINSTON_MODULE_NEST_PROVIDER);
const logger = app.get<LoggerService>(WINSTON_MODULE_NEST_PROVIDER);
app.useLogger(logger);
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