Parse RTC_MIN_PORT and RTC_MAX_PORT

This commit is contained in:
Sergiu Toma 2022-10-18 18:27:02 +03:00
parent be5f97762a
commit 1a7371fe18

4
app.js
View File

@ -67,8 +67,8 @@ const peers = io.of('/');
const createWorker = async () => { const createWorker = async () => {
try { try {
worker = await mediasoup.createWorker({ worker = await mediasoup.createWorker({
rtcMinPort: process.env.RTC_MIN_PORT, rtcMinPort: parseInt(process.env.RTC_MIN_PORT),
rtcMaxPort: process.env.RTC_MAX_PORT, rtcMaxPort: parseInt(process.env.RTC_MAX_PORT),
}) })
console.log(`[createWorker] worker pid ${worker.pid}`); console.log(`[createWorker] worker pid ${worker.pid}`);