Split streaming server from web server (#24702)
This commit is contained in:
parent
36d7d1781f
commit
15b2d7eec5
5 changed files with 108 additions and 75 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
const fs = require('fs');
|
||||
const http = require('http');
|
||||
const path = require('path');
|
||||
const url = require('url');
|
||||
|
||||
const dotenv = require('dotenv');
|
||||
|
@ -17,8 +18,11 @@ const WebSocket = require('ws');
|
|||
|
||||
const environment = process.env.NODE_ENV || 'development';
|
||||
|
||||
// Correctly detect and load .env or .env.production file based on environment:
|
||||
const dotenvFile = environment === 'production' ? '.env.production' : '.env';
|
||||
|
||||
dotenv.config({
|
||||
path: environment === 'production' ? '.env.production' : '.env',
|
||||
path: path.resolve(__dirname, path.join('..', dotenvFile))
|
||||
});
|
||||
|
||||
log.level = process.env.LOG_LEVEL || 'verbose';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue