Путь к сертификатам теперь воспринимается как полный, а не относительный.

This commit is contained in:
2024-09-13 01:58:09 +04:00
parent 9ad5beb611
commit 9c7a87fc65

View File

@@ -5,16 +5,13 @@ import { PartialValidationPipe } from "./utility/validation/partial-validation.p
import { ClassValidatorInterceptor } from "./utility/validation/class-validator.interceptor"; import { ClassValidatorInterceptor } from "./utility/validation/class-validator.interceptor";
import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger"; import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger";
import { apiConstants, httpsConstants } from "./contants"; import { apiConstants, httpsConstants } from "./contants";
import * as path from "node:path";
import * as fs from "node:fs"; import * as fs from "node:fs";
async function bootstrap() { async function bootstrap() {
const app = await NestFactory.create(AppModule, { const app = await NestFactory.create(AppModule, {
httpsOptions: { httpsOptions: {
cert: fs.readFileSync( cert: fs.readFileSync(httpsConstants.certPath),
path.join(__dirname, httpsConstants.certPath), key: fs.readFileSync(httpsConstants.keyPath),
),
key: fs.readFileSync(path.join(__dirname, httpsConstants.keyPath)),
}, },
}); });
const validatorOptions: ValidatorOptions = { const validatorOptions: ValidatorOptions = {