Environment Var storage : .env OR .toml?

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 !

1 Like

.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 :white_check_mark: :x:
Date Support :x: :white_check_mark:
String Support :white_check_mark: :white_check_mark:
Automatic Removal of values on remix :white_check_mark: :x:
Number Support :white_check_mark: :white_check_mark:
Nested Object Support :x: :white_check_mark:
Need to install a separate library :x: :white_check_mark:

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 !


This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.