I was up rather late last night and I noticed they were working on replit. You will notice that they have added this new feature
You can no longer directly access the .env file, you have to click on a button (looks like a lock) and then enter key value pairs.
I don’t know how to see my env variables in the command line. Tried process.env but it didn’t understand it
I was passing all functional tests but no more. And I cannot run them either, because I cannot uncomment NODE_ENV. it’s annoying.
I’ll play with it a little and create a new replit but any help is surely welcome.
Otherwise, Replit still natively allow access to environment variables using process.env, but this has to be done through a Node (or other) server - not the Shell terminal.
As you say, you can no longer comment out variables, but you are able to just change the name (key) to anything else (add a letter), and this should achieve the same.
I see something new now: when you click on the lock, two keys appear: DB and PORT.
You can access them, change them…
I entered a new key NODE_ENV = TEST and the tests started running. I can comment out it again…
They must have implemented it this morning because it wasn’t there yet when I got out of bed. It’s actually pretty cool.