Skip to content

Commit

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


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 +39,8 @@ async function bootstrap() {

app.enableCors();
await app.init();
https.createServer(httpsOptions, server).listen(APPLICATION.HTTPS_PORT);
http.createServer(server).listen(APPLICATION.HTTP_PORT);
// https.createServer(httpsOptions, server).listen(APPLICATION.HTTPS_PORT);

}

Expand Down

0 comments on commit e17e003

Please sign in to comment.