Load the backend's env files from its own directory

The root `bun test` also runs the backend's tests, from the repository root, where
dotenv-flow found no backend/.env: they passed only while the root .env still carried
stale SEMAPPS_* lines, and failed on a clean one (HOME_URL undefined).
This commit is contained in:
Sylvain Duchesne
2026-11-02 21:50:24 +01:00
parent 223059c629
commit ea359488b6
+3 -1
View File
@@ -1,4 +1,6 @@
require('dotenv-flow').config();
// The backend's own env files, wherever the process starts: the root `bun test` runs the
// backend's tests too, from the repository root.
require('dotenv-flow').config({ path: require('path').join(__dirname, '..') });
module.exports = {
APP_NAME: process.env.SEMAPPS_APP_NAME,