Ask coding questions

← Back to all posts
.env question(plz answer thx) about lists HTML
CookieSnowOwl (41)

so env variables
but first lemme tell me my env vars(for right now )
so all of them are []
and i want to append $Usernamee, $Passwordd, and $USERNAMEPASS or smh like that to the lists plz help how does it work PLZ HELP HOW DOES IT WORK PLZ HELP HOW DOES IT WORK

Answered by xxpertHacker (934) [earned 5 cycles]
View Answer
Coder100 (18057)

You cannot modify .env variables programmatically. They are constants. In fact, they shouldn't even be modified at all in that way, they are meant to store API keys!!

CookieSnowOwl (41)

hmm so how can i store var
if env can i programmatically makes new envs
that would be kinda weird [email protected]

xxpertHacker (934)

@Coder100 Afaik, that's complete bs, any program should be able to modify it's executing environment.

Deno provides means to do so:

C provides setenv:

And by no means were program environments designed+intended to store API keys :/

@CookieSnowOwl Regardless, the env is totally the wrong tool for this job, maybe use file writing/reading, or accessing global variables?

Coder100 (18057)

Yeah, but on replit .envs arent even files @xxpertHacker

Coder100 (18057)

What other things would you store @xxpertHacker

CookieSnowOwl (41)
  1. you can access them by creating a .replit file and removing it right after
  2. @xxpertHacker but then everybody can see everybody's password :(
xxpertHacker (934)

@CookieSnowOwl Oh yeah, RIP, we're on Replit, how about using a database?