Go Pro Sign Up Login
0 days 0 hrs 0 min 0 sec

Summer Sale

50% off Level Up Pro until you unsubscribe.
Get access to ALL 128 courses on Level Up Tutorials

This is your last chance to get Level Up Pro for $145/year.

or Learn More
Moon Moon

Buy Now and unlock this series

$

49

.99

$

29

.99

yours forever

Become a Pro and unlock everything

$

24

.99

per month

Dot ENV

Before we go any further, we will take a minute to set up dot ENV support in our app. This is important if we want to share secrets and keys but keep the values hidden from the public. npm install —save dotenv

Downloads

Become a pro to download code and videos

Comments

Hartwig

12 months ago [edited]

On windows 10.

in env.js just add an object with path: 'src/.env In fact, the dotenv will work just as here. Trying to make use of the preloading does not make the trick. It is just so that the library, at least on windows does use this additional path info.

--> dotenv.config( { path: 'src/.env' } )

Cheers

Want to join the conversation?

Become a Pro member today!