Im using NestJS via HTTPS.
import { NestFactory } from '@nestjs/core';
import { fstat } from 'fs';
import { AppModule } from './app.module';
import {readFileSync} from 'fs'
async function bootstrap() {
const httpsOptions = {
key:readFileSync('tsl/private-key.pem'),
cert:readFileSync('tsl/public-cert.pem')
}
const app = await NestFactory.create(AppModule,{httpsOptions});
await app.listen(3000);
}
bootstrap();
I try to get simple POST request:
@Post()
test(@Body() body){
console.log(body);
}
But output is always {}
I readed that nestjs cant parse data correctly. How can i fix that?
