This guide will help you deploy the web development projects from this repository to various hosting platforms.
- π Static Site Hosting
- π§ Local Development
- π± Testing on Mobile Devices
- π Deployment Platforms
- π Security Considerations
- π― Performance Optimization
Most projects in this repository are static web applications that can be hosted on any static hosting service.
- Basic knowledge of HTML, CSS, and JavaScript
- Git installed on your computer
- A web browser for testing
- Download/Clone the repository:
git clone https://github.com/hamzawritescode/web-development.git
cd web-development- Open projects directly:
- Navigate to any project folder (e.g.,
Calculator-App/) - Double-click on
index.htmlto open in your browser - For the repository overview, open
projects-showcase.html
# Python 3
python -m http.server 8000
# Python 2 (if Python 3 is not available)
python -m SimpleHTTPServer 8000# Install globally
npm install -g http-server
# Run in project directory
http-server -p 8000php -S localhost:8000- Access your projects:
- Open
http://localhost:8000in your browser - Navigate to specific projects or view
projects-showcase.html
- Open
-
Find your computer's IP address:
# Windows ipconfig # macOS/Linux ifconfig
-
Start local server (as above)
-
Access from mobile:
http://YOUR_IP_ADDRESS:8000
- Press
F12in your browser - Click the mobile device icon
- Test different screen sizes
Perfect for: Static sites, portfolio projects
# 1. Create a new repository on GitHub
# 2. Push your project files
# 3. Go to Settings > Pages
# 4. Select source branch (usually 'main')
# 5. Your site will be available at: username.github.io/repository-nameExample workflow:
git init
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/YOUR_USERNAME/YOUR_PROJECT.git
git branch -M main
git push -u origin mainPerfect for: Quick deployments, continuous integration
- Visit netlify.com
- Drag and drop your project folder
- Instant deployment with custom URL
- Optional: Connect to GitHub for auto-deployments
Perfect for: Modern web applications, great performance
# Install Vercel CLI
npm install -g vercel
# In your project directory
vercel
# Follow the prompts for instant deploymentPerfect for: Simple static site deployment
# Install Surge CLI
npm install -g surge
# In your project directory
surge
# Follow prompts to deployPerfect for: Google ecosystem, advanced features
# Install Firebase CLI
npm install -g firebase-tools
# Login and initialize
firebase login
firebase init hosting
# Deploy
firebase deploy- Upload files via FTP/File Manager
- Point domain to project directory
- Cost: $3-10/month
- Full server control
- Install web server (Apache/Nginx)
- Cost: $5-50/month
- AWS CloudFront
- Cloudflare Pages
- Global distribution
-
HTTPS Setup:
- Most modern hosting platforms provide free SSL
- Use Let's Encrypt for custom servers
- Redirect HTTP to HTTPS
-
Content Security Policy:
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self' 'unsafe-inline';"
/>-
Input Validation:
- Always validate user inputs
- Sanitize data before processing
- Use proper error handling
-
Resource Integrity:
<!-- For external resources -->
<link
rel="stylesheet"
href="https://cdn.example.com/style.css"
integrity="sha384-hash-here"
crossorigin="anonymous"
/>-
Optimize Images:
- Use WebP format when possible
- Compress images (tools: TinyPNG, ImageOptim)
- Use appropriate dimensions
-
Minify Code:
# CSS minification npm install -g clean-css-cli cleancss -o style.min.css style.css # JavaScript minification npm install -g uglify-js uglifyjs script.js -o script.min.js
-
Enable Compression:
- Gzip/Brotli compression
- Most hosting platforms enable this automatically
-
Optimize Loading:
<!-- Preload critical resources --> <link rel="preload" href="style.css" as="style" /> <!-- Lazy load images --> <img src="image.jpg" loading="lazy" alt="Description" />
- All file paths are correct (no broken links)
- Images and assets are optimized
- Code is tested across different browsers
- Mobile responsiveness verified
- Forms and interactive elements work properly
- Console has no errors
- All pages load correctly
- External links work properly
- Contact forms submit successfully
- Site loads quickly (< 3 seconds)
- Mobile experience is smooth
- SEO meta tags are present
-
Broken CSS/JS Links:
- Check file paths are relative (not absolute)
- Verify file names match exactly (case-sensitive)
-
CORS Issues:
- Use local server for development
- Check API endpoints allow cross-origin requests
-
Mobile Display Issues:
- Ensure viewport meta tag is present
- Test with browser dev tools
- Use responsive units (rem, em, %)
-
Slow Loading:
- Optimize images and assets
- Minimize HTTP requests
- Use CDN for external resources
- π MDN Web Docs - Comprehensive web development reference
- π€ Stack Overflow - Community Q&A
- π¬ GitHub Discussions - Project-specific help
- π§ Open an issue in this repository for project-related problems
- GitHub Pages: GitHub Pages Documentation
- Netlify: Netlify Docs
- Vercel: Vercel Documentation
- Firebase: Firebase Hosting Docs
Once deployed, your projects will be accessible worldwide! Share your deployments:
- Add to your portfolio
- Share on social media
- Include in your resume
- Contribute the deployment link back to this repository
Happy deploying! πβ¨
Made with β€οΈ for the open source community | Hacktoberfest 2025