Beginner · What full-stack development is · topic 4 of 34 · 30 min
Setting up your tools
Explanation
The tools and what each one does
| Tool | What it is | Check it works |
|---|---|---|
| VS Code | A free code editor with a built-in terminal | Open a folder and create a file |
| Node.js | Runs JavaScript outside the browser, on your computer or a server | node -v |
| npm | Installs packages (ready-made code) and runs scripts; comes with Node.js | npm -v |
| Git | Saves versions of your code on your computer | git --version |
| GitHub | A website that stores your Git projects online and shows them to others | Sign in at github.com |
Node.js: pick the LTS version
LTS means Long-Term Support: a version that gets bug and security fixes for a long time. Even-numbered major versions (22, 24, 26 and so on) become LTS; odd-numbered ones are short-lived. At the time of writing (October 2026), Node 24 is LTS and Node 26 is due to become LTS soon. Always install the version nodejs.org marks as LTS on the day you install.
The terminal in five commands
The terminal is a window where you type commands instead of clicking. VS Code has one built in (View, then Terminal). On Windows, PowerShell or Git Bash both work.
pwd # print the folder you are in
ls # list files (dir also works in Windows cmd)
mkdir notes-app # make a new folder
cd notes-app # go into it
cd .. # go back up one foldernpm and package.json
package.json is the project's ID card and stock register. It lists the project name, the packages it depends on, and scripts: short names for longer commands. You run a script with npm run <name>, for example npm run dev. npm also writes package-lock.json, which records the exact versions installed; commit it so everyone gets the same versions.
{
"name": "notes-server",
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "node --watch src/index.js",
"start": "node src/index.js",
"test": "node --test"
},
"dependencies": {
"express": "^5.1.0"
}
}Git and GitHub basics
A commit is a saved snapshot of your project with a message saying what changed. Pushing sends your commits to GitHub. A branch is a separate line of work: you can try a feature on a branch without breaking the main code, then merge it back when it works. Note that GitHub does not accept your account password for git push: sign in through the browser window Git opens for you (Git for Windows includes this), or set up an SSH key.
git init # start tracking this folder
git add . # choose all changed files for the next commit
git commit -m "Set up project folders"
git branch -M main # name the main branch "main"
git remote add origin https://github.com/<your-name>/notes-app.git
git push -u origin main # send commits to GitHub
git switch -c add-search # make and move to a new branchThe Notes app folder layout
notes-app/
client/ React frontend (its own package.json)
server/ Express backend (its own package.json)
.gitignore
README.md
package.json optional: "workspaces": ["client", "server"].gitignore and README
A .gitignore file lists files Git must never save. node_modules holds downloaded packages: it is huge and can be rebuilt with npm install, so it is ignored. .env holds secrets such as database passwords, so it is ignored too. Commit a .env.example with the variable names and fake values instead. The README.md explains what the app is and how to run it.
Watch the lesson
Setting up your tools · 1/7
Before writing code, we set up our tools: VS Code, Node.js with npm, and Git with GitHub.
Prefer a video by a teacher? Find free videos on “setup vs code node js npm git github for beginners web development” on YouTube ↗
In real life: A college project team that lost a day
Four students start a canteen pre-order app. One of them commits the node_modules folder, so every push takes minutes and the repository grows past hundreds of megabytes. Another commits a .env file with the database password to a public repository. They spend a day cleaning up and changing the password. The next semester, they start with a .gitignore, a .env.example, a README with "how to run" steps and package.json scripts for dev and test. A new teammate runs the app in ten minutes on the first day.
Practice (0/3 done)
Write missingScripts(pkg, required) that returns an array of the script names in required that pkg.scripts does not have, in the order of required. A script whose command is an empty string counts as missing. If pkg has no scripts at all, every required name is missing.
Write missingIgnores(lines, required) that checks a .gitignore. lines is the file split into lines. Ignore blank lines and comment lines (starting with #) and trim spaces. Treat "node_modules", "node_modules/" and "/node_modules" as the same entry (remove one leading and one trailing slash before comparing). Return the entries from required that are not covered, in the order of required.
Set up the Notes app repository on your computer and on GitHub. You will build in it for the rest of the course. Tick each item when it is done.
Quick quiz
Read more (free)
Pass the quiz (60% or more) or mark this topic as done when you are ready.
Your progress is saved on this device only.