Open FuadEfendi opened 3 years ago
I found README in subfolder
but it is not enough... what about "env.js", any documentation?
@FuadEfendi env.js loads environment variables fromtestenv
file in repository root - is this something that does not work for you?
It loads testenv
in this repository and it works. But I created new repository from scratch, installed "dotenv", copied "env.js", and it doesn't work. Maybe some other dependency/configuration setting is missing?
No other configuration locations I'm aware of - perhaps testenv
path (../
) is off in your repo?
yes I know about relative "../"; it is fixed accordingly; I am just trying to find "who is calling env.js
when I run command ng serve
and cannot find, some magic. So I assumed it will run automatically, but it doesn't (in my separate project). But it runs in this project. dotenv
or something else.
Hi @oleksandrpravosudko-okta,
So I found the answer. env.js
is not used at all so changing ../
won't help. Perhaps it is something which could be used in some environments. Maybe with dotenv
.
Instead, we are using extra-webpack.config.js
:
// Read environment variables from "testenv". Override environment vars if they are already set.
const TESTENV = path.resolve(__dirname, '..', 'testenv');
Thank you!
env.js will load environment from testenv.
I am newbie and cannot find any clue how it works... how to configure it for new project? "dotenv"?
Please document few words in README and here; thanks!