If I want to create a second project, what considerations do I need to make?
If I want to create a second project, what considerations do I need to make? I want to create a second local project, but I am worried if I run wasp db start for the first time it might mess with my db for my original project that i started with the saas template
4 Replies
Hi @haarismian. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
When creating a second project with Wasp, you can use the
wasp new
command to start the interactive mode for setting up a new project. This will prompt you to input the project name and to select a template. The chosen template will then be used to generate the project directory with the specified name source (https://wasp-lang.dev/docs/general/cli#creating-a-new-project).
As for the database, each Wasp project has its own isolated database when you run wasp db start
. This means that creating a new project and starting its database won't interfere with the database of your existing project. However, if you encounter any issues, you might need to run wasp db migrate-dev
before starting the project for the first time source (https://github.com/wasp-lang/wasp/issues/248).
Here's an example of how you can create a new project:
And then to start the database for the new project:
Remember, if you encounter any issues, you can always reach out to the Wasp community on Discord (https://discord.gg/rzdnErX) for help.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @haarismian, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?m worried if I run wasp db start for the first time it might mess with my db for my original project that i started with the saas templateWasp takes your project location on disk and generates a unique ID that is uses for the database volume name (basically, where the data will be stored). So, if you have two projects in two different locations on your computer, there is no need to worry 🙂
I have many projects locally, and this is not an issue
Yup,
wasp db start
is made in such way that it works for multiple projects, no worries! Each project will have its own database.