Can't edit my .env file

Hi,
Until a few days ago, I was able to edit my .env file. Now when I try to edit it, it asks me to add an ENVIRONMENT VAIABLE. I need to see my .env file. Then only I feel sure that I am doing the right thing. Please tell me how I can view my …env file. I also do not know exactly what you mean by theterm, ENVIRONMENT VARiABLE. For the time being, I am stuck. I can’t move forward. I have been with GLItch for more than 4 years.
Ahammadunny Pathiaseril.
My e-mail address: ahammadunny@hotmail.com

Hey @ahammadunny,

  1. You should find your .env file in the filetree. If you don’t find it, click on New File and then type in .env.
    README_md_–_hyper_dour_slope

  2. Once you have an .env file, click on ‘Add a Variable’.

  3. .env variables take the form of key=value.

  4. Enter the variable name in ‘Variable Name’ and the value of variable in ‘Variable Value’.
    For example, if you’re building a Discord bot, you need to enter TOKEN as the name of the variable and the token string as the variable value.
    env–_hyper_dour_slope

  5. Then in your code, you should be able to refer to the .env variable using its key like this:

process.env.KEY

where KEY is the variable name we gave.

More info here: https://glitch.happyfox.com/kb/article/18-how-do-i-store-secrets-credentials-or-private-data/

Hope this helps!

1 Like

Hello,
I can see its name on the left. When I click on it, Usually the file appears on the screen. But from yesterday onwards, after you updated something, it shows all kinds of weird options like HIDE, SHOW etc. It does not show the ,env file. Howeever I try, the file ie the text of the file does not appear on the screen. That is the help I need. I do not need those HIDE, SHOW buttons there. Please allow me to edit my file. I can’t do it now. You can try on my behalf. I have no problem. Please help me.Thank you.
Ahammadunny Pathiaseril.

@ahammadunny There should be a button that says ‘plaintext’ (it has a picture of a little eye). This will allow you to view the normal file without the other buttons and new UI. This a very recent update to Glitch to make it easier to use. If this fixed your issue please mark it as a ‘solution’
Here’s a picture of the button I am talking about:
This is the button:
image

2 Likes

Hi Eddie,
It fixed my problem.Where should I click to show that it wsas the solution? Thank you vry much.
Sincerely yours,
Ahammadunny Pathiaseril.

1 Like

@ahammadunny, at the bottom of @EddiesTech post, there is a button that says ‘Solution’. Clicking on it will mark @EddiesTech’s answer as solution.
solution

1 Like

This post was flagged by the community and is temporarily hidden.

That’s kinda out of this topic, isn’t it? FYI, I’m not.

2 Likes

yes, yes it is off-topic