-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Offer MongoURL guidance in options #681
Conversation
I struggled to get my MongoDB configuration working (I kept being told it wasn't configured when it clearly was!) I saw elsewhere that IndieKit expects MongoDB URIs to have a path element (to define the database name), I added `/indiekit` to my URI and things started working. There may be ways to set this as a default if it's unspecified, but I'm not familiar enough with the codebase to offer a fix yet. Feel free to replace this PR with a code-based one instead!
Thanks for this info. I’m still figuring out MongoDB, and have come across needing/not needing a database in the connection URL before.
Where did you see this, is it Indiekit’s docs, or somewhere else in the codebase? Also, what platform are you running Indiekit on, it might be a platform specific requirement, a case of database names being inferred in some places, and not others. Will dig into this a bit more to ensure any updates to the docs are correct before merging, but thanks for the PR and reporting this sticking point! |
Researching this a bit further, I’ve found some older documentation which says:
However, no newer documentation says this, and all guides and tutorials don’t mention it. Here is contemporary documentation on the connection string format: v4.4, v6.3 current. Indiekit specifies which database to use when it starts up, too: indiekit/packages/indiekit/index.js Line 66 in 6e6cfa2
So, with all that said, I think the current documentation is correct. If you let me know which service you are hosting your Indiekit server on, and what version of MongoDB you have installed, I can work out if any platform-specific guidance is needed. |
With #695, Indiekit will now notify users more prominently about connection issues. It will also use any database name given in the connection string (else use the default, This is a breaking change that will ship in the next beta release, and I’ve added a note to the documentation highlighting this change. |
I wonder if this situation occurred due to the way connection strings are handled. Without
With a
If
God, this is confusing! |
I struggled to get my MongoDB configuration working (I kept being told it wasn't configured when it clearly was!)
I saw elsewhere that IndieKit expects MongoDB URIs to have a path element (to define the database name), I added
/indiekit
to my URI and things started working.Assuming I've correctly understood the problem and a suitable fix, I thought I'd update guidance in the docs!
There may be ways to set this as a default if it's unspecified, but I'm not familiar enough with the codebase to offer a fix yet. Feel free to replace this PR with a code-based one instead!