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

Automatically create mongo db on init #28

Closed
1 task done
RyanClementsHax opened this issue Feb 26, 2024 · 0 comments · Fixed by #35
Closed
1 task done

Automatically create mongo db on init #28

RyanClementsHax opened this issue Feb 26, 2024 · 0 comments · Fixed by #35

Comments

@RyanClementsHax
Copy link
Collaborator

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

mantis-app init assumes you have a db url ready. Many users of this cli won't have it ready or will cancel creation thinking mantis is too complicated.

Describe the solution you'd like

mantis-app init should give the user an option to choose how the database is created. It should be one of these options to start with:

Teachability, documentation, adoption, migration strategy

No response

What is the motivation / use case for changing the behavior?

A db is the only component that needs to be user provided during mantis-app init. Automating this will make the "init" experience seem "magical".

RyanClementsHax added a commit that referenced this issue Feb 27, 2024
- prompt the user if they want to provide their own mongo connection string or if a local db should be created
- in the case the user selects the latter, scaffold the generated project will create a local mongodb with data persisted to disk
- add mongodb-memory-server to accomplish the above
    - this is used for in memory e2e testing, but can be configured for local persistence
    - this dependency will be handy for when we create e2e tests
- use a tmp dir for the dbPath
    - if the user creates multiple workspaces with the same project name, the dbPath will collide
    - this is fine for now

Closes #28
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 a pull request may close this issue.

1 participant