If you’re taking one of my Pluralsight courses, first of all, thank you! I hope you learn something!
Most of my courses will have some starter code. This is a collection of files I’ve prepared to save you time and allow the courses to focus on more important things.
This quick guide will show you three methods to setup the starter code on your own machine and get started with a course. For this guide, we’ll use my Building Web Applications with hapi Pluralsight course as an example.
I host the code on Github. There are three ways to get the code onto your own machine:
- Clone in the command line
- Clone with Github client
- Download as a zip
Here is the github site for our example course. Arrows are numbered to correspond with the above methods.
1. Clone the Starter Code in the Command Line
If you have git installed already, this is likely the easiest way to get the code.
Open a command line and navigate to a folder where you’d like the code to reside. Cloning a repo pulls the code down into a new directory, so don’t create a folder for the project.
This is the pattern for the clone command:
git clone <GITHUB CLONE URL>
The github clone URL is copied from the Github site. In the above image the field to get this value is indicated by the #1 arrow. Here’s an example of the command for our example course.
git clone https://github.com/ryanmurakami/pluralsight-hapi-starter-code.git
Once this is executed, git will pull all the files down to your local machine into the folder
/pluralsight-hapi-starter-code. You can change this folder name once it’s complete. That’s it!
2. Clone the Starter Code with the Github Client
Github provides a GUI client which you may find useful. They have versions for Mac and Windows, but none for Linux at the moment. If you’ve already got it installed, Github makes it super easy to clone repositories.
Click the clone in desktop button on the github repository page.
This will open up the Github client on your computer and prompt you for a save location.
Once you’ve selected a suitable root directory, the Github client will clone the repository there.
When it’s complete, just navigate to that folder and you’re ready to get started.
3. Download the Starter Code
You can also download the Starter Code in a zip archive.
Clicking this will allow you to save the zip file locally. Then you can unzip it wherever you’d like on your local machine.