3. Create your workspace
Professional developers keep their projects organised in dedicated folders. This makes code easier to find, back up, and share. You're going to create a single folder that will hold all your API projects for this book.
Think of this as creating a dedicated workspace on your computer. Everything related to this book and your API learning journey will live in one place. When you come back to work on projects later, you'll know exactly where to find them.
Pick the section for your operating system below and follow the commands in order.
Windows
Navigate to your home directory:
cd %USERPROFILE%
Create the projects folder:
mkdir api-projects
cd api-projects
Verify your location:
echo %CD%
You should see something like C:\Users\YourName\api-projects.
macOS and Linux
Navigate to your home directory, create the folder, and enter it:
cd ~
mkdir api-projects
cd api-projects
Verify your location:
pwd
You should see something like /Users/YourName/api-projects on macOS or /home/yourname/api-projects on Linux.
What these commands do
cd. Change directory; moves you to a different folder~or%USERPROFILE%. Your home directorymkdir. Make directory; creates a new folderpwd. Print working directory; shows your current location
These basic commands let you navigate your file system through text. Once you're comfortable with them, you'll find the command line faster than clicking through folders in File Explorer or Finder.
Next, you'll set up a virtual environment inside your workspace. That virtual environment is the isolated space where this book's libraries will live.