fixed .env stuff

This commit is contained in:
Daniel Ledda
2021-03-21 19:26:30 +01:00
parent 82d5077838
commit cc4f2bb53a
3 changed files with 2 additions and 8 deletions

View File

@@ -1,6 +0,0 @@
PORT=4040
SERVER_ROOT=/climate
MYSQL_ADDRESS=192.168.0.198
MYSQL_USERNAME=admin
MYSQL_PW=sekna123jk
SENSOR_PING_INTERVAL=30

View File

@@ -5,7 +5,7 @@ import {setupCollections} from "./Collections";
import path from "path";
import {startSensorPinger} from "./pingSensors";
dotenv.config({ path: path.resolve(__dirname + "./.env") });
dotenv.config({ path: path.resolve(__dirname + "/.env") });
const SERVER_ROOT = process.env.SERVER_ROOT ?? "/";
async function main() {