forked from iemafzalhassan/full-stack_chatApp
-
Notifications
You must be signed in to change notification settings - Fork 343
.env #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rutvikpatel1233124324
wants to merge
7
commits into
LondheShubham153:main
Choose a base branch
from
rutvikpatel1233124324:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
.env #2
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0962e41
.env
rutvikpatel1233124324 20c7dc0
Delete backend/.env
rutvikpatel1233124324 99e9c44
Create .env
rutvikpatel1233124324 fc411ff
Update .env
rutvikpatel1233124324 91bda7b
Update index.html
rutvikpatel1233124324 9e93b40
Update .env
rutvikpatel1233124324 50e38c8
Update docker-compose.yml
rutvikpatel1233124324 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| PORT=5001 | ||
| MONGODB_URI=mongodb+srv://RUTVIK:RUTVIK@cluster0.mqydhii.mongodb.net/ | ||
| JWT_SECRET=3f04b622d451b3f9d6cfd3b720edc8aa3de6a5a88e9f5a40f5e18086e87d1d9f3b0e5128dbf7be4dba9eaf3a6e6d3a60f15a6d9df01c861f9f9fbbd30e8f648b | ||
| CLOUDINARY_CLOUD_NAME=di94spf5r | ||
| CLOUDINARY_API_KEY=538656955955732 | ||
| CLOUDINARY_API_SECRET=Jh2DTpe3FjmWMaq1_jabtAR8-9I | ||
| CLOUDINARY_URL=cloudinary://<your_api_key>:<your_api_secret>@di94spf5r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Improved backend service configuration, but secrets should not be hardcoded.
Building the backend locally and explicitly mapping ports is a best practice for development. However, including sensitive values (like
JWT_SECRETand database credentials) directly in the compose file is a security risk. It's better to use theenv_filedirective to load environment variables from a separate.envfile, or use Docker secrets for production.Example improvement:
This keeps secrets out of versioned files and aligns with the new
.envfile added to the backend.Also applies to: 27-28