Installation and Setup Fundamentals
Setting up your complete development environment
Installation and Setup Fundamentals
Setting up a proper development environment is crucial for efficient web development. This lesson will guide you through installing and configuring all the essential tools you'll need throughout this course.
Development Environment Overview
Your development environment consists of several key components:
- Code Editor: Where you'll write your code
- Web Browser: For testing and debugging your applications
- Node.js & npm: JavaScript runtime and package manager
- Git: Version control system
- Terminal/Command Line: For running commands and tools
1. Code Editor: Visual Studio Code
Visual Studio Code (VS Code) is the most popular code editor for web development.
Installation
- Go to code.visualstudio.com
- Download the version for your operating system
- Run the installer and follow the setup wizard
- Launch VS Code to confirm installation
Essential Extensions
Install these extensions for web development:
- Auto Rename Tag: Automatically rename paired HTML tags
- Bracket Pair Colorizer: Color-code matching brackets
- ES7+ React/Redux/React-Native snippets: Code snippets for React
- GitLens: Enhanced Git capabilities
- Live Server: Launch development server with live reload
- Prettier: Code formatter
- Thunder Client: API testing tool
Configuration
Set up VS Code preferences:
{ "editor.fontSize": 14, "editor.tabSize": 2, "editor.insertSpaces": true, "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll": true }, "files.autoSave": "afterDelay", "explorer.confirmDelete": false}
2. Web Browser Setup
Primary Browser: Chrome or Firefox
Use Chrome or Firefox for development as they have excellent developer tools.
Developer Tools
Learn to access developer tools:
- Chrome: F12 or Ctrl+Shift+I (Cmd+Option+I on Mac)
- Firefox: F12 or Ctrl+Shift+I (Cmd+Option+I on Mac)
Browser Extensions for Development
- React Developer Tools: For React debugging
- Vue.js devtools: For Vue.js debugging (if you explore Vue later)
- Lighthouse: For performance auditing
3. Node.js and npm
Node.js allows you to run JavaScript outside the browser and includes npm (Node Package Manager).
Installation
- Go to nodejs.org
- Download the LTS (Long Term Support) version
- Run the installer
- Verify installation by opening terminal/command prompt and running:
node --versionnpm --version
Both commands should return version numbers.
Understanding npm
npm is a package manager that allows you to:
- Install libraries and frameworks
- Manage project dependencies
- Run build scripts and development servers
4. Git Version Control
Git tracks changes in your code and enables collaboration.
Installation
Windows: Download from git-scm.com
Mac: Install via Homebrew (brew install git
) or download from git-scm.com
Linux: Use your package manager (sudo apt install git
on Ubuntu)
Initial Configuration
Set up your identity (replace with your information):
git config --global user.name "Your Name"git config --global user.email "your.email@example.com"
GitHub Account
- Create a free account at github.com
- This will be essential for storing your code and collaborating
5. Terminal/Command Line
Accessing the Terminal
- Windows: Use PowerShell or install Windows Terminal from Microsoft Store
- Mac: Use Terminal app (found in Applications > Utilities)
- Linux: Use your distribution's terminal application
Basic Terminal Commands
Learn these essential commands:
# Navigate directoriescd folder-name # Change to directorycd .. # Go up one levelpwd # Show current directory
# File operationsls # List files (dir on Windows)mkdir folder-name # Create directorytouch filename.txt # Create file (New-Item on Windows PowerShell)
# Clear terminalclear # Clear screen (cls on Windows)
6. Creating Your First Project
Let's test your setup by creating a simple "Hello World" webpage:
Step 1: Create Project Folder
mkdir my-first-websitecd my-first-website
Step 2: Create HTML File
Create index.html
with this content:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My First Website</title></head><body> <h1>Hello, World!</h1> <p>Welcome to web development!</p></body></html>
Step 3: Open in Browser
- Right-click the HTML file and open with your browser, or
- If you installed Live Server extension, right-click in VS Code and select "Open with Live Server"
Troubleshooting Common Issues
Node.js Installation Issues
- Ensure you downloaded the correct version for your operating system
- Restart your terminal after installation
- On Windows, you may need to run as administrator
Git Configuration Issues
- Double-check your email and name spelling
- Ensure you're using the same email as your GitHub account
VS Code Extension Issues
- Reload VS Code after installing extensions
- Check that extensions are enabled in the Extensions panel
Organizing Your Development Folder
Create a structured folder for all your projects:
Development/├── Projects/│ ├── personal/│ ├── tutorials/│ └── experiments/├── Resources/└── Notes/
Best Practices
- Keep your tools updated: Regularly update VS Code, Node.js, and Git
- Backup your settings: Export VS Code settings and sync them across devices
- Use meaningful folder names: Organize projects clearly
- Learn keyboard shortcuts: They'll make you much more efficient
Verification Checklist
Confirm your setup is complete:
- [ ] VS Code installed with essential extensions
- [ ] Chrome or Firefox with developer tools accessible
- [ ] Node.js and npm installed and working
- [ ] Git configured with your name and email
- [ ] Terminal/command line accessible
- [ ] First HTML file created and viewable in browser
- [ ] GitHub account created
Next Steps
With your development environment set up, you're ready to dive deeper into how the web works. In the next module, we'll explore the fundamental concepts of the internet and web that will inform everything you build as a developer.
Congratulations on completing your development setup! You now have the tools that professional developers use every day.
Lesson Complete!
Great job! You've finished this lesson. Ready to continue?