Skip to content
Snippets Groups Projects
Commit d57a9d14 authored by Jonas Zohren's avatar Jonas Zohren :speech_balloon:
Browse files

make 2 paths configurable

parent 694bfe0b
No related branches found
No related tags found
No related merge requests found
Pipeline #8004 passed with warnings
......@@ -214,7 +214,7 @@ app.post(
);
try {
const autoAttachRoomsPath = path.join(__dirname, "autoAttach.json");
const autoAttachRoomsPath = process.env.AUTO_ATTACH_FILE || path.join(__dirname, "autoAttach.json");
const urlList = JSON.parse(fs.readFileSync(autoAttachRoomsPath));
const attach = async function (roomUrl) {
try {
......@@ -243,7 +243,7 @@ try {
setInterval(async () => {
const fileContent = JSON.stringify(generateRoomList());
await fs.promises.writeFile(
path.join(__dirname, "rooms.json"),
process.env.ROOM_LIST_FILE_PATH || path.join(__dirname, "rooms.json"),
fileContent,
"utf8"
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment