staart / api

🏁🛠️ SaaS backend & API framework based on @nestjs

Home Page:https://staart.js.org/api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 issue has not seen any activity in the past 2 months so I'm marking it as stale. I'll close it if it doesn't see any activity in the coming week.

This is fixed in v3.