Skip to content

Commit

Permalink
Merge pull request #23 from yuminn-k/main
Browse files Browse the repository at this point in the history
feat: add env path
  • Loading branch information
yuminn-k authored Nov 15, 2024
2 parents a729017 + bddb56c commit 572dc21
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ const socketIo = require("socket.io");

const PORT = process.env.PORT || 8000;
const options = {
key: fs.readFileSync("./config/ssl/key.pem", "utf-8"),
cert: fs.readFileSync("./config/ssl/crt.pem", "utf-8"),
key: fs.readFileSync(
process.env.SSL_KEY_PATH || "./config/ssl/key.pem",
"utf-8"
),
cert: fs.readFileSync(
process.env.SSL_CERT_PATH || "./config/ssl/crt.pem",
"utf-8"
),
};
const server = https.createServer(options, app);
const io = socketIo(server, {
Expand Down Expand Up @@ -352,6 +358,7 @@ const createWebRtcTransport = async (router) => {
listenIps: [
{
ip: process.env.LISTEN_IP || "127.0.0.1",
announcedIp: process.env.ANNOUNCED_IP,
},
],
enableUdp: true,
Expand Down

0 comments on commit 572dc21

Please sign in to comment.