What’s the best way to store my environment variables on glitch.com please ? I saw that .env is native to glitch.com and maybe encrypted.
Thanks for your replies !
What’s the best way to store my environment variables on glitch.com please ? I saw that .env is native to glitch.com and maybe encrypted.
Thanks for your replies !
.env files are native to glitch and have a built in interface, but they only have key/value pairs
TOML (Tom’s Obvious Minimal Language) has key/value pairs but is more like JavaScript objects if that makes sense. They support arrays, tables, dates, times, nested object (object inside an object), etc. However, the sensitive values won’t be removed on remix (without a .gitignore)
I’d say go with .env files since it’s natively supported, but if you need more flexibility, use a TOML file.
I made a table to help you review your options
ENV Files | TOML Files | |
---|---|---|
Native UI | ![]() |
![]() |
Date Support | ![]() |
![]() |
String Support | ![]() |
![]() |
Automatic Removal of values on remix | ![]() |
![]() |
Number Support | ![]() |
![]() |
Nested Object Support | ![]() |
![]() |
Need to install a separate library | ![]() |
![]() |
I love @aboutdavid’s answer here! I also want to add that we don’t encrypt .env files, they just are not included in remixes of the project or in the editor for non-members of the project.
Wow, what a constructive reply ! Thank you for all the information !