-
Couldn't load subscription status.
- Fork 12
Add dotenv for local environment development #3
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
base: master
Are you sure you want to change the base?
Conversation
|
Also pushing changes to close issue #1 by changing http/https in callbackUrl dependent on new ENVIRONMENT key. |
|
Awesome, thanks for your contribution. I'll try to get my hands on it later this week! 👍 |
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.
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 |
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.
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") { |
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.
Can you change this section so there is less duplication?
const protocol = process.env.ENVRIONMENT === "production" ? "https" : "http";
const callbackUrl = protocol + ...;
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.
This PR adds dotenv to allow .env files to be read on local environments, closing issue #2 .