Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
sahalali committed Jan 14, 2025
1 parent e17e003 commit 5a9b57b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ import { AppModule } from "./app.module";
import { APPLICATION } from "./config/system.config";
import * as express from "express";
import * as http from "http";
import * as fs from "node:fs";
import * as https from "node:https";


async function bootstrap() {
// const httpsOptions = {
// key: fs.readFileSync("./secrets/private-key.pem"),
// cert: fs.readFileSync("./secrets/public-certificate.pem")
// };
const httpsOptions = {
key: fs.readFileSync("./secrets/private-key.pem"),
cert: fs.readFileSync("./secrets/public-certificate.pem")
};

const server = express();
const app = await NestFactory.create(
Expand Down Expand Up @@ -40,7 +42,7 @@ async function bootstrap() {
app.enableCors();
await app.init();
http.createServer(server).listen(APPLICATION.HTTP_PORT);
// https.createServer(httpsOptions, server).listen(APPLICATION.HTTPS_PORT);
https.createServer(httpsOptions, server).listen(APPLICATION.HTTPS_PORT);

}

Expand Down

0 comments on commit 5a9b57b

Please sign in to comment.