.env not working in Node js
Hello,
I'm trying to access some credentials from a .env file in a Node js repl, and it doesn't work.
I've used process.env.VARIABLE1
and my .env file looks something like:
VARIABLE1="Hello"
VARIABLE2="Hi"
And it just doesn't work. I know I have the right credentials, because it worked without the .env file...
Can someone help me out?
Voters
2plus2is4hoi (94)
Well Idk how node works but if you could take the results of the file and search it for VARIABLE1, then set something to the next few characters it could work
youll need to
since .env support does not come with Node
@notGilbert okay to I need to install it?
@notGilbert Still doesn't work
@thethermometer yes, replit will automatically install it if it sees that you required it