remix-run / remix

Build Better Websites. Create modern, resilient user experiences with web fundamentals.
https://remix.run
MIT License
29.34k stars 2.47k forks source link

[Feature]: Add `.env` to `.gitignore` in Remix App Server template #760

Closed JasonEtco closed 2 years ago

JasonEtco commented 2 years ago

What is the new or updated feature that you are suggesting?

Hello! In trying out Remix and following this doc on setting up a database, I realized that the .env file is not automatically included in the .gitignore file generated by the Remix App Server template. I think it should be, since .env is recognized as a sensitive file, intended for storing development secrets. After adding some GitHub App credentials (for user authentication), I almost committed those secrets 😱

I could not find the source for the Remix App Server so I'm opening an issue, happy to open a PR to do this if you'll point me in the right direction. Also not sure if this is a bug or a feature 😅 feel free to re-classify it as needed 👍

Why should this feature be included?

Noted above, but: .env files are typically used to store sensitive credentials, and not including it in .gitignore might give folks the wrong impression that it was included already, since Remix uses .env automatically.

fre-ben commented 2 years ago

Noticed this as well while doing the tutorial today - should be an easy, userfriendly fix :) Good idea

IAmLuisJ commented 2 years ago

Added this to the dev branch, it should merge with main on the next version update. Sorry, I think I should have said "fixed #768 " for it to close automatically when it merges to main.

JasonEtco commented 2 years ago

Oh awesome, thanks for doing that @IAmLuisJ!