fixed env resolution
This commit is contained in:
6
server/src/.env
Normal file
6
server/src/.env
Normal file
@@ -0,0 +1,6 @@
|
||||
PORT=4040
|
||||
SERVER_ROOT=/climate
|
||||
MYSQL_ADDRESS=192.168.0.198
|
||||
MYSQL_USERNAME=admin
|
||||
MYSQL_PW=sekna123jk
|
||||
SENSOR_PING_INTERVAL=30
|
||||
@@ -5,7 +5,7 @@ import {setupCollections} from "./Collections";
|
||||
import path from "path";
|
||||
import {startSensorPinger} from "./pingSensors";
|
||||
|
||||
dotenv.config();
|
||||
dotenv.config({ path: path.resolve(__dirname + "./.env") });
|
||||
const SERVER_ROOT = process.env.SERVER_ROOT ?? "/";
|
||||
|
||||
async function main() {
|
||||
|
||||
Reference in New Issue
Block a user