Skip to content
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

restore process.env.MONGODB_URI for test-project #1212

Merged
merged 2 commits into from
May 30, 2019
Merged

Conversation

dcousens
Copy link
Member

@dcousens dcousens commented May 21, 2019

@jesstelford as discussed, #1201 did not introduce CONNECT_TO as a Keystone-wide environment variable, but only for the keystone command. Thereby this had nothing set.

This resolves that, possibly.

@changeset-bot
Copy link

changeset-bot bot commented May 21, 2019

🦋 Changeset is good to go

Latest commit: c8b9578

We got this.

Not sure what this means? Click here to learn what changesets are.

@dcousens dcousens requested a review from jesstelford May 21, 2019 07:17
@dcousens dcousens marked this pull request as ready for review May 21, 2019 07:17
Copy link
Contributor

@jesstelford jesstelford left a comment

Choose a reason for hiding this comment

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

Thanks!
One comment, and needs a Changeset too.

@@ -2,3 +2,4 @@
# CLOUDINARY_KEY=abc123
# CLOUDINARY_SECRET=abc123
PORT=1
MONGODB_URI=mongodb://127.0.0.1:27017/tp_basic
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to add the value here, we don't want to force its usage, instead we can rely on the fallback.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think providing this here provides a good example for users to follow?

Copy link
Contributor

Choose a reason for hiding this comment

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

dotenv-safe will read .env.example for which env vars are required. With this change, if the environment doesn't provide a MONGODB_URI, dotenv-safe will throw an error, which is not what we want (we want it to default to the localhost fallback when not set), especially as this is a test project and we will be using an in-memory mongo server which is passed in manually (ie; not via an env var)

Copy link
Member Author

Choose a reason for hiding this comment

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

Rebased and removed.

@keystonejs keystonejs deleted a comment from changeset-bot bot May 21, 2019
@jesstelford jesstelford merged commit 2df1e92 into master May 30, 2019
@jesstelford jesstelford deleted the dcousens-patch-1 branch May 30, 2019 05:21
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.

None yet

2 participants