Local Development with Craft Nitro
If you have a boilerplate project that you work with when starting new projects, it’s simple to use that to create a new Nitro project via the `nitro create` command.
If you have a boilerplate project that you work with when starting new projects, it’s simple to create a new Nitro project via the nitro create
command.
There is a boilerplate project Andrew Welch, and I created a while back in a live stream. Let us use that as our starting point instead of a clean and default Craft installation.
The project is located at Github repository and as a Packagist package.
If we wanted to access it via the Github repository, we run:
➜ nitro create https://github.com/CraftQuest/craft-starter craftstarter
This command will create the directory craftstarter
and download the code into the directory.
After that, the command will kick off the Nitro and Craft installation process. We need to choose our Nitro settings for this project and then let it do its thing.
Once create-project
command finishes, we can run nitro craft setup
to populate the database with the default data. If your boilerplate project has a starter database, then you will want to import it using nitro db import [databasefile]
. We will talk about then in the following video when we migrate an existing project to Nitro.
Finally, the last step is to run nitro craft setup
and complete the installation process. In the case of this boilerplate project, there is not a database to go with it, just the files.
And now we have set up a new project using a boilerplate repository and Nitro!
Local Development with Craft Nitro is made up of the following videos: