Skip to content

Conversation

@matthewjamesr
Copy link

This PR adds dotenv to allow .env files to be read on local environments, closing issue #2 .

@matthewjamesr
Copy link
Author

Also pushing changes to close issue #1 by changing http/https in callbackUrl dependent on new ENVIRONMENT key.

@reneaaron
Copy link
Owner

Awesome, thanks for your contribution. I'll try to get my hands on it later this week! 👍

Copy link
Owner

@reneaaron reneaaron left a 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
Copy link
Owner

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") {
Copy link
Owner

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 + ...;

Copy link

@ekzyis ekzyis Oct 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just stumbled over this PR from 2 years ago and noticed that there's a typo in ENVRIONMENT.

For anyone interested how I got here: 1 > 2 > 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants