How to use dotenv in Wappler?

I saw in the release notes for Wappler 3.7.8 that “support for dotenv module for setting different environment variables” was added.

I cannot for the life of me find out how to use dotenv in Wappler and I’ve found no documentation on the topic. Would be very thankful if someone could point me the right way, thanks!

I haven’t had the requirement to use environment variables yet. But its a great question.
Please help here @Teodor.

You should use dotenv only in your development environment, on the server you should set the actual environment there.

For your development you can simply create a .env file and add your variables there like:


Thank you for your replies.

I was thinking more how do I access the variables in Wappler? Also, is the .env filed just loaded automatically for Development and do I need to switch this feature on somehow?

This is now available in Wappler 4.9.0

This topic was automatically closed after 2 days. New replies are no longer allowed.