keystonejs / keystone-5

https://v5.keystonejs.com
MIT License
64 stars 34 forks source link

Docs for connecting to mongo or postgres are unclear #104

Open jesstelford opened 4 years ago

jesstelford commented 4 years ago

Context: I'm a new user who has heard Keystone now supports Postgres.

I head to the docs and type in "Postgres". I see this:

Screen Shot 2020-05-28 at 9 27 04 pm

Clicking the first option takes me here which describes installing & connecting to postgres itself, but not how I use postgres in Keystone.


Similarly for Mongo:

I head to the docs and type in "Mongo". I see:

Screen Shot 2020-05-28 at 9 29 07 pm

There's no "Mongo" results. Feeling adventurous, I click the "Mongoose" option which takes me to this page. Unfortunately it's light on details and only mentions Mongoose, which I'm not using.


In both cases, I have no idea how to setup Keystone to connect to either a Postgres or Mongo DB.

_This issue inspired by this reddit post_

xtechgamer735 commented 4 years ago

If you are creating a new project, it gives you the option to create with mongo or psql and set's it up nicely. What that does is define the connector (lines 8 - 19 in index.js). You then need to update this with a connection string for your psql server, which is done when you generate the project or edit line 11. You then need to run a create tables command, documented here: https://www.keystonejs.com/quick-start/

As far as management of the database goes, the ORM of Keystone abstracts this and does this for you. I only started using Keystone a few hours ago (and I'm a mongo man) so I'm unsure at this point how migrations work but I assume there's a command.

stale[bot] commented 4 years ago

It looks like there hasn't been any activity here in over 6 months. Sorry about that! We've flagged this issue for special attention. It wil be manually reviewed by maintainers, not automatically closed. If you have any additional information please leave us a comment. It really helps! Thank you for you contribution. :)