lemaiwo / ui5-middleware-route-proxy

UI5Tooling route proxy
MIT License
11 stars 4 forks source link

Please support searching .env in parent directories #10

Open DerGuteWolf opened 4 years ago

DerGuteWolf commented 4 years ago

with a multirepo one has several apps in one repo in different subdirectories. Currently one would need to have a seperate .env for the username/password in each app subdirectory which makes changing the password cumbersome. It would be nice if the .env could also be searched in parent subdirectories. Accourding to eg https://github.com/motdotla/dotenv/issues/238#issuecomment-348017037 this can be accomplished by simply substituting dotenv.config(); with dotenv.config({ path: require('find-config')('.env') }) or even better substituting

const dotenv = require("dotenv");
dotenv.config();

with require('dotenv').config({ path: require('find-config')('.env') })

Also fromEnv: true ist still in the readme.md but this is not used anymore.