fixed env resolution

This commit is contained in:
Daniel Ledda
2021-03-21 19:23:03 +01:00
parent 29f10e6e31
commit 82d5077838
2 changed files with 1 additions and 1 deletions

View File

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