Default .env.example inline comments causing malformed links and values.
WTM-Jarryd opened this issue · comments
Hi Anand,
The inline comments within the .env.example file cause issues with the assigned values due to dotenv evaluating the comment as part of the value.
e.g. FRONTEND_URL = "http://localhost:3000" # URL for Staart UI
evaluates to
FRONTEND_URL: "http://localhost:3000" # URL for Staart UI
This causes issues later when emails containing links to {{frontendUrl}}, as they will all have the above evaluated value.
A note should be added to the https://staart.js.org/api/setting-up-environment-variables documentation stating that comments should be on their own lines.
Edit: Removed an incorrect note about dotenv not supporting comments. Comments are marked with #
env.example.txt
I've attached an .env.example with all the inline comments shifted to the line above the value they are describing.
Kind regards,
Jarryd
Thanks for opening this issue, @WTM-Jarryd! I didn't know dotenv required comments to start with a new line, I'll fix the example soon!
This is fixed in v3.