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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user