How to use skyra env utilities with the cli generated project?
I want to use env variables to store my mongo uri, but due to skyra utilities being their i cant use dotenv
How am i supposed to use it?
6 Replies
@Skyra/env-utilities is a small wrapper around dotenv-cra, dotenv-expand and dotenv. You use it exactly like you have it there, or use the utility methods of envParseString and such
the thing, without changing any code, eg: not adding the
mongo: string
in setup.ts, and using process.env.MONGO returns undefined
and
still using it like shown above i still get undefinedDo you actually have a file named
.env
in your src directory though?yes
thats where my token is stored
token works fine
oh wait
works fine now
Idk then. Verify all your code and all your files more thoroughly, make sure casing is correct, log the entire process.env to find any issues
Did you just not rebuild or something 💀
No i just restart 3 times
js ig 💀