Add dotenv for local environment development#3
Open
matthewjamesr wants to merge 5 commits intoreneaaron:masterfrom
Open
Add dotenv for local environment development#3matthewjamesr wants to merge 5 commits intoreneaaron:masterfrom
matthewjamesr wants to merge 5 commits intoreneaaron:masterfrom
Conversation
Author
|
Also pushing changes to close issue #1 by changing http/https in callbackUrl dependent on new ENVIRONMENT key. |
Owner
|
Awesome, thanks for your contribution. I'll try to get my hands on it later this week! 👍 |
reneaaron
requested changes
Nov 7, 2022
Owner
reneaaron
left a comment
There was a problem hiding this comment.
Thanks again for your contribution, let's tackle the open 2 issues.
Did you also test if this still works on Glitch?
| lerna-debug.log* | ||
| .pnpm-debug.log* | ||
|
|
||
| # Package lock |
Owner
There was a problem hiding this comment.
Why would you want to exclude the package-lock.json? This file is important for having the same versions across installs:
https://dev.to/adamklein/package-lock-json-in-git-or-not-50l5
| const callbackUrl =`https://${req.get("host")}/do-login?${params.toString()}`; | ||
| let callbackUrl; | ||
|
|
||
| if (process.env.ENVRIONMENT === "production") { |
Owner
There was a problem hiding this comment.
Can you change this section so there is less duplication?
const protocol = process.env.ENVRIONMENT === "production" ? "https" : "http";
const callbackUrl = protocol + ...;
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds dotenv to allow .env files to be read on local environments, closing issue #2 .