Skip to content

Commit

Permalink
uncommenting https
Browse files Browse the repository at this point in the history
  • Loading branch information
LordFarquaadtheCreator committed Jun 26, 2024
1 parent d066082 commit 02db69c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import http from "http";
import https from "https";
import fs from "fs";

// const privateKey = fs.readFileSync('cert/privkey.pem', 'utf8');
// const certificate = fs.readFileSync('cert/cert.pem', 'utf8');
// const credentials = {key: privateKey, cert: certificate};
const privateKey = fs.readFileSync("cert/privkey.pem", "utf8");
const certificate = fs.readFileSync("cert/cert.pem", "utf8");
const credentials = { key: privateKey, cert: certificate };

const PORT = 3000;
const app = express();
Expand Down Expand Up @@ -66,7 +66,7 @@ app.get("*", (req: any, res: any) => {
});

const httpServer = http.createServer(app);
// const httpsServer = https.createServer(credentials, app);
const httpsServer = https.createServer(credentials, app);

httpServer.listen(PORT);
// httpsServer.listen(PORT+1);
httpsServer.listen(PORT + 1);

0 comments on commit 02db69c

Please sign in to comment.