Local Development with Craft Nitro

Setting Up A Boilerplate Project 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 boil­er­plate project that you work with when start­ing new projects, it’s sim­ple to cre­ate a new Nitro project via the nitro create command. 

There is a boil­er­plate project Andrew Welch, and I cre­at­ed a while back in a live stream. Let us use that as our start­ing point instead of a clean and default Craft installation.

The project is locat­ed at Github repos­i­to­ry and as a Pack­ag­ist package. 

If we want­ed to access it via the Github repos­i­to­ry, we run:

➜ nitro create https://github.com/CraftQuest/craft-starter craftstarter

This com­mand will cre­ate the direc­to­ry craftstarter and down­load the code into the directory.

After that, the com­mand will kick off the Nitro and Craft instal­la­tion process. We need to choose our Nitro set­tings for this project and then let it do its thing.

Once create-project com­mand fin­ish­es, we can run nitro craft setup to pop­u­late the data­base with the default data. If your boil­er­plate project has a starter data­base, then you will want to import it using nitro db import [databasefile]. We will talk about then in the fol­low­ing video when we migrate an exist­ing project to Nitro.

Final­ly, the last step is to run nitro craft setup and com­plete the instal­la­tion process. In the case of this boil­er­plate project, there is not a data­base to go with it, just the files.

And now we have set up a new project using a boil­er­plate repos­i­to­ry and Nitro!

Local Development with Craft Nitro is made up of the following videos: