mirror of
https://github.com/n08i40k/schedule-parser-next.git
synced 2025-12-06 17:57:45 +03:00
Добавлена возможность самостоятельно указать порт (по умолчанию 5050)
This commit is contained in:
@@ -10,3 +10,7 @@ export const httpsConstants = {
|
|||||||
certPath: process.env.CERT_PEM_PATH!,
|
certPath: process.env.CERT_PEM_PATH!,
|
||||||
keyPath: process.env.KEY_PEM_PATH!,
|
keyPath: process.env.KEY_PEM_PATH!,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const apiConstants = {
|
||||||
|
port: process.env.API_PORT ?? 5050,
|
||||||
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { ValidatorOptions } from "class-validator";
|
|||||||
import { PartialValidationPipe } from "./utility/validation/partial-validation.pipe";
|
import { PartialValidationPipe } from "./utility/validation/partial-validation.pipe";
|
||||||
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 { httpsConstants } from "./contants";
|
import { apiConstants, httpsConstants } from "./contants";
|
||||||
import * as path from "node:path";
|
import * as path from "node:path";
|
||||||
import * as fs from "node:fs";
|
import * as fs from "node:fs";
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ async function bootstrap() {
|
|||||||
];
|
];
|
||||||
SwaggerModule.setup("api-docs", app, swaggerDocument);
|
SwaggerModule.setup("api-docs", app, swaggerDocument);
|
||||||
|
|
||||||
await app.listen(43373);
|
await app.listen(apiConstants.port);
|
||||||
}
|
}
|
||||||
|
|
||||||
bootstrap().then();
|
bootstrap().then();
|
||||||
|
|||||||
Reference in New Issue
Block a user