Fix trampling of port env variable
This commit is contained in:
parent
743e239e52
commit
af90baea33
1 changed files with 3 additions and 3 deletions
|
|
@ -9,6 +9,8 @@ import readline from 'readline';
|
|||
import os from 'os';
|
||||
|
||||
const LOG = !!process.env.LOG || false;
|
||||
// eslint-disable-next-line
|
||||
const PORT = process.env.PORT || 5432;
|
||||
const VALID_AUDIO_EXTENSIONS = ['wav', 'mp3', 'ogg'];
|
||||
|
||||
const isAudioFile = (f) => {
|
||||
|
|
@ -54,7 +56,7 @@ async function getBanks(directory, flat = false) {
|
|||
banks[bank].push(subDir);
|
||||
return subDir;
|
||||
});
|
||||
banks._base = `http://localhost:5432`;
|
||||
banks._base = `http://localhost:${PORT}`;
|
||||
return { banks, files };
|
||||
}
|
||||
|
||||
|
|
@ -134,8 +136,6 @@ const server = http.createServer(async (req, res) => {
|
|||
readStream.pipe(res);
|
||||
});
|
||||
|
||||
// eslint-disable-next-line
|
||||
const PORT = process.env.PORT || 5432;
|
||||
const IP_ADDRESS = '0.0.0.0';
|
||||
let IP;
|
||||
const networkInterfaces = os.networkInterfaces();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue