Part 3 Β· Chapter 11

Simple Platforms: Vercel, Netlify & cPanel

When AWS feels like overkill β€” simpler deployment for most projects.

What you'll learn in this chapter

  • The deployment complexity spectrum β€” from "click and go" to "build everything yourself"
  • Vercel β€” the fastest path from Next.js code to live production URL
  • Netlify β€” static sites, Jamstack, and serverless functions made effortless
  • cPanel β€” the traditional web hosting control panel for PHP and WordPress
  • Render β€” the modern middle ground between Vercel and AWS
  • How to choose the right platform based on your project's actual needs
  • When to graduate from simple platforms to full cloud infrastructure

The Furnished Apartment vs. Buying Land

Imagine you need somewhere to live. You have a spectrum of choices.

At one end: a fully furnished apartment. You sign the lease, you get the keys, you move in tonight. The furniture is already there. The internet is connected. The heating works. You don't care what's behind the walls. You just live there and pay rent.

At the other end: a plot of empty land. Total control. You design the house, hire the architect, hire the builders, choose every tile, wire every socket, plant every tree in the garden. It's exactly what you want, but it takes months and requires expertise you probably don't have yet.

Vercel and Netlify are the furnished apartments of the software deployment world. You push code to GitHub and your app is live in seconds. AWS EC2 with Kubernetes is the empty land. Total control, enormous power, but you're responsible for everything.

Neither end of the spectrum is wrong. The mistake is using the wrong tool for your stage. Using Kubernetes for a portfolio website is using a sledgehammer to hang a picture frame. Using Vercel for a high-traffic API with complex networking requirements is trying to live in a furnished apartment with 20 roommates you've never met.

The Deployment Complexity Spectrum
────────────────────────────────────────────────────────────────────────
Simple ←─────────────────────────────────────────────────────→ Complex

  Vercel     Netlify     Render      Heroku      ECS/EKS    Kubernetes
    β”‚            β”‚          β”‚           β”‚            β”‚           β”‚
  "push to    "push to   "push to   "git push   "write      "manage
  GitHub,      GitHub,    GitHub,    heroku"      YAML,        nodes,
  done"        done"      done"                  ECR, VPC"    CNI, etc"

Cost:
  Free        Free      Free/cheap  Free→$$$    Per resource  Per node
  (hobby)    (hobby)   (hobby/pro)  (outgrows)   (scales)     (scales)

Best for:
  Next.js    Static    Full-stack   Prototypes  Production   Large-scale
  React      Jamstack  apps, APIs   demos       workloads    platforms
🏠 The Housing Analogy

Vercel / Netlify: fully furnished apartment β€” move in today, everything is set up, pay monthly rent, limited customization.

Render / Railway: unfurnished apartment β€” you bring your own things, but the plumbing and electricity are done for you.

AWS / GCP / Azure: buy land and build your own house β€” total control, total responsibility, maximum power, maximum effort.

Vercel β€” The Frontend Deployment King

Vercel was founded by Guillermo Rauch, the creator of Next.js. The company exists to make deploying JavaScript frontend applications as frictionless as possible. They succeed spectacularly. A fresh Next.js project can go from laptop to live production URL in under five minutes β€” and that includes connecting a custom domain with automatic SSL.

When you push code to your GitHub repository, Vercel detects the framework (Next.js, Nuxt, SvelteKit, Astro, Remix, and dozens more), builds it automatically with the right settings, and deploys it across 100+ edge locations worldwide. Every pull request gets its own preview deployment URL so you can share a link to test before merging. Every deployment is immutable β€” if something goes wrong, instant rollback to any previous version.

Key Vercel Features

  • Preview Deployments: every pull request automatically gets a unique URL like myapp-feature-login-a3b4c.vercel.app. Share it with your team for review before merging.
  • Edge Network: Vercel's CDN has nodes in 100+ cities. Your static assets and edge functions serve from the location closest to the user β€” typically under 50ms globally.
  • Serverless Functions: any file in /api directory becomes a serverless function. Node.js, Python, Go, Ruby supported. No Lambda configuration required.
  • Edge Functions: even faster than regular serverless β€” runs JavaScript at the CDN edge node, not a central data center. Use for auth, redirects, A/B testing, personalization.
  • Analytics: built-in web vitals and performance analytics with no extra setup.
  • Automatic SSL: every deployment, including custom domains, gets a free Let's Encrypt certificate automatically renewed.

vercel.json β€” Configuration File

Most Vercel projects need no configuration file at all β€” Vercel auto-detects the framework. When you do need customization, vercel.json in the project root controls it:

// vercel.json β€” project configuration
{
  "buildCommand": "npm run build",
  "outputDirectory": ".next",
  "framework": "nextjs",
  "regions": ["iad1", "lhr1"],
  "env": {
    "DATABASE_URL": "@database-url",
    "NEXT_PUBLIC_API_URL": "@api-url"
  },
  "headers": [
    {
      "source": "/(.*)",
      "headers": [
        {
          "key": "X-Frame-Options",
          "value": "DENY"
        },
        {
          "key": "Strict-Transport-Security",
          "value": "max-age=31536000; includeSubDomains"
        }
      ]
    }
  ],
  "redirects": [
    {
      "source": "/blog",
      "destination": "/articles",
      "permanent": true
    }
  ]
}

Vercel CLI

# Install globally
npm i -g vercel

# Login to your Vercel account
vercel login

# Deploy current directory (interactive first run)
vercel

# Deploy to production
vercel --prod

# Link current directory to an existing Vercel project
vercel link

# Set an environment variable
vercel env add DATABASE_URL production
vercel env add DATABASE_URL preview
vercel env add DATABASE_URL development

# List environment variables
vercel env ls

# View deployment logs
vercel logs

# List all deployments
vercel ls

# Roll back to a previous deployment
vercel rollback

# Promote a preview deployment to production
vercel alias set myapp-abc123.vercel.app myapp.com

Serverless API Routes on Vercel

Create a file at api/hello.js (or inside app/api/ for Next.js App Router) and it becomes a serverless endpoint automatically. No API Gateway configuration, no Lambda setup, no IAM roles.

// api/hello.js β€” becomes https://myapp.vercel.app/api/hello
export default function handler(req, res) {
  const { name = 'World' } = req.query;

  res.status(200).json({
    message: `Hello, ${name}!`,
    method: req.method,
    timestamp: new Date().toISOString()
  });
}
πŸ’‘ Tip: Vercel's Hobby Tier is Genuinely Good

Vercel's free Hobby tier supports unlimited personal projects, 100GB bandwidth, serverless function invocations, and unlimited preview deployments. It's not a crippled trial β€” it's fully functional for personal projects and small production apps. The Pro tier ($20/month) adds team collaboration and higher limits.

Netlify β€” Static Sites and Jamstack

Netlify pioneered the concept of "Jamstack" β€” building web apps from JavaScript, APIs, and pre-rendered Markup rather than dynamically rendering HTML on a server for every request. The result: static HTML files served from a CDN, infinitely scalable, impossible to DDoS, blazing fast, and essentially free to host.

Netlify is excellent for sites built with Gatsby, Hugo, Jekyll, Eleventy, Astro, and any static site generator. It also works great for single-page apps (React, Vue, Svelte) that call external APIs. Where Vercel is optimized specifically for Next.js and server-side rendering, Netlify's strength is the pure static site and Jamstack world.

Key Netlify Features

  • Netlify Functions: serverless functions (AWS Lambda under the hood) that deploy automatically alongside your static site. Create files in netlify/functions/.
  • Netlify Identity: drop-in user authentication with JWT tokens. Add a signup/login flow to your static site without any backend code.
  • Netlify Forms: add netlify attribute to any HTML form and Netlify captures submissions β€” no backend server needed. View submissions in the dashboard.
  • Deploy Previews: like Vercel, every pull request gets a preview URL for review.
  • Branch Deploys: you can configure specific branches to deploy to specific subdomains (e.g., staging branch β†’ staging.myapp.com).
  • Split Testing: serve different versions of your site to different percentages of visitors for A/B testing β€” no code required.

netlify.toml β€” Configuration File

Netlify uses a netlify.toml file at the project root. It controls build settings, redirects, headers, and function configuration:

# netlify.toml

[build]
  command = "npm run build"
  publish = "dist"
  functions = "netlify/functions"

[build.environment]
  NODE_VERSION = "20"
  NPM_FLAGS = "--legacy-peer-deps"

# Redirect /api/* to serverless functions
[[redirects]]
  from = "/api/*"
  to = "/.netlify/functions/:splat"
  status = 200

# SPA: redirect all routes to index.html (for React Router)
[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

# Security headers on all responses
[[headers]]
  for = "/*"
  [headers.values]
    X-Frame-Options = "DENY"
    X-Content-Type-Options = "nosniff"
    X-XSS-Protection = "1; mode=block"
    Referrer-Policy = "strict-origin-when-cross-origin"
    Content-Security-Policy = "default-src 'self'; script-src 'self' 'unsafe-inline'"

# Long cache for hashed assets
[[headers]]
  for = "/assets/*"
  [headers.values]
    Cache-Control = "public, max-age=31536000, immutable"

# Context-specific builds
[context.production.environment]
  REACT_APP_ENV = "production"

[context.staging.environment]
  REACT_APP_ENV = "staging"

Netlify Functions

// netlify/functions/send-email.js
// Deployed as: /.netlify/functions/send-email
import sgMail from '@sendgrid/mail';

sgMail.setApiKey(process.env.SENDGRID_API_KEY);

export const handler = async (event) => {
  if (event.httpMethod !== 'POST') {
    return { statusCode: 405, body: 'Method Not Allowed' };
  }

  const { to, subject, text } = JSON.parse(event.body);

  await sgMail.send({ to, from: 'noreply@myapp.com', subject, text });

  return {
    statusCode: 200,
    body: JSON.stringify({ success: true })
  };
};

Netlify CLI

# Install globally
npm i -g netlify-cli

# Login to Netlify
netlify login

# Link current directory to a Netlify site
netlify link

# Start local dev server (runs functions too)
netlify dev

# Deploy a draft (preview URL)
netlify deploy

# Deploy to production
netlify deploy --prod

# Open the site in a browser
netlify open

# View function logs
netlify functions:invoke send-email --payload '{"to":"test@test.com"}'

# Set an environment variable
netlify env:set DATABASE_URL "postgresql://..."

# List environment variables
netlify env:list
πŸ’‘ Tip: Netlify vs Vercel for Static Sites

Both Netlify and Vercel are excellent for static sites. The practical difference: use Vercel if you're building with Next.js (Vercel created it and is optimized for it). Use Netlify if you want Forms, Identity, or Split Testing without writing any backend code. For plain static sites, either works β€” pick the one whose dashboard you prefer.

cPanel β€” The Traditional Web Hosting Control Panel

cPanel has been around since 1996. It is the graphical control panel that powers most shared web hosting plans β€” the kind you find at Namecheap, HostGator, SiteGround, GoDaddy, and Bluehost. If you've ever bought a web hosting plan and seen a panel with colorful icons for "File Manager," "phpMyAdmin," and "Email Accounts," you've met cPanel.

Think of shared cPanel hosting like renting a room in a house with many other tenants. The landlord (the hosting company) owns the server. You get your own space within it β€” a directory on the disk, a MySQL database, and an email address. The landlord handles the server's hardware, operating system, and security patches. You manage everything inside your space through the cPanel graphical interface.

What cPanel Gives You

  • File Manager: a browser-based file browser to upload, edit, and manage PHP/HTML files without needing FTP software.
  • phpMyAdmin: a web-based MySQL/MariaDB database administrator. Create tables, run queries, import/export databases.
  • Email Accounts: create custom email addresses for your domain (you@yourdomain.com). Configure webmail, email forwarding, autoresponders.
  • SSL/TLS Manager: install free Let's Encrypt certificates with one click.
  • Cron Jobs: schedule recurring tasks β€” clear caches, send reports, run database maintenance.
  • Softaculous: one-click installer for WordPress, Joomla, Drupal, Magento, Moodle, and 400+ other applications.
  • Subdomain Manager: create blog.yourdomain.com, shop.yourdomain.com, etc.
  • .htaccess: configure Apache-level redirects, password protection, URL rewriting.

Uploading Files via SFTP

The cPanel File Manager is convenient for quick edits, but SFTP (Secure FTP) is the right way to upload whole projects. Use FileZilla, Cyberduck, or the command line:

# Connect to your hosting server via SFTP
sftp username@yourdomain.com

# Inside sftp interactive mode:
# Navigate to public_html (the web root)
cd public_html

# Upload a single file
put localfile.php

# Upload an entire directory (-r = recursive)
put -r ./myapp/ myapp/

# Download a file
get backup.sql ./

# Exit
bye

# Or use rsync for efficient directory sync (only changed files)
rsync -avz --progress ./dist/ username@yourdomain.com:public_html/myapp/

WordPress on cPanel

The most common cPanel use case. A full WordPress deployment through Softaculous:

  1. Login to cPanel β†’ scroll to Softaculous Apps Installer β†’ click WordPress
  2. Click "Install" β€” fill in domain, folder, admin username, and email
  3. Click "Install" again β€” Softaculous creates the database, downloads WordPress, configures wp-config.php, and gives you a live site
  4. Visit yourdomain.com/wp-admin to login and start customizing

Node.js Apps on cPanel

Modern cPanel installations (version 82+) support Node.js through the "Setup Node.js App" feature. This is not as capable as a dedicated VPS, but it works for small apps:

# On cPanel, the Node.js App wizard creates this structure:
# /home/username/myapp/          ← application root
# /home/username/myapp/app.js    ← startup file
# /home/username/myapp/package.json

# After creating via cPanel GUI, SSH in to install dependencies:
ssh username@yourdomain.com

# Activate the virtual environment created by cPanel
source /home/username/nodevenv/myapp/20/bin/activate

# Install dependencies
cd ~/myapp
npm install

# The cPanel GUI "Restart" button starts the app via Passenger
# Passenger handles process management and proxies port 80/443
⚠️ cPanel Limitations You Must Know

Shared resources: your site shares CPU, RAM, and disk I/O with dozens or hundreds of other users on the same server. If a neighbor runs a poorly optimized WordPress plugin, your site slows down.

No Docker: you cannot run Docker containers on shared hosting. If your app requires Docker, you need a VPS or cloud server.

No custom ports: you can't run services on custom ports accessible from the internet β€” only port 80/443 through the web server.

Outgrow it fast: cPanel shared hosting is excellent for WordPress, PHP sites, and small static sites. The moment you need custom infrastructure, Docker, microservices, or high traffic, move to a VPS or cloud.

Render β€” The Modern Middle Ground

Render launched in 2019 as a direct alternative to Heroku (which was free-tier killed in 2022). It occupies the perfect middle ground: simpler than AWS but more powerful than Vercel for backend services. It natively supports Docker containers, static sites, backend services, PostgreSQL databases, Redis, cron jobs, and background workers β€” all from a single platform with a clean UI.

render.yaml β€” Infrastructure as Code

Render's killer feature is render.yaml: define your entire application stack in code, commit it to GitHub, and Render deploys everything β€” services, databases, environment variable wiring β€” automatically on every push.

# render.yaml β€” define the whole stack in code
services:
  # Web API service
  - type: web
    name: my-api
    env: node
    plan: free
    buildCommand: npm install && npm run build
    startCommand: npm start
    healthCheckPath: /health
    envVars:
      - key: NODE_ENV
        value: production
      - key: DATABASE_URL
        fromDatabase:
          name: my-db
          property: connectionString
      - key: REDIS_URL
        fromService:
          type: redis
          name: my-cache
          property: connectionString

  # Background worker (same code, different start command)
  - type: worker
    name: my-worker
    env: node
    buildCommand: npm install && npm run build
    startCommand: npm run worker
    envVars:
      - key: DATABASE_URL
        fromDatabase:
          name: my-db
          property: connectionString

  # Cron job (runs on a schedule)
  - type: cron
    name: daily-cleanup
    env: node
    schedule: "0 2 * * *"
    buildCommand: npm install
    startCommand: node scripts/cleanup.js

  # Static site (React/Vue/etc.)
  - type: web
    name: my-frontend
    env: static
    buildCommand: npm run build
    staticPublishPath: ./dist
    routes:
      - type: rewrite
        source: /*
        destination: /index.html

databases:
  - name: my-db
    databaseName: mydb
    user: myuser
    plan: free

  - name: my-cache
    type: redis
    plan: free
🀯 Fun Fact: Heroku's Fall and Render's Rise

Heroku was the original "push to deploy" platform and made PaaS mainstream in the 2010s. In 2022, Salesforce (which acquired Heroku) eliminated the free tier entirely. Overnight, thousands of developers needed an alternative. Render absorbed a huge portion of that audience. Railway is another Heroku alternative worth knowing. Both have generous free tiers and similar developer experience.

Choosing the Right Platform

Here is the complete decision table. Be honest about what you're building β€” choose the platform that fits today, knowing you can always migrate as you grow:

Platform Decision Table
──────────────────────────────────────────────────────────────────────────
Platform     Best For                           Not Great For
──────────────────────────────────────────────────────────────────────────
Vercel       Next.js, React/Vue/Svelte          Long-running backends
             Frontend + API routes              Custom networking
             Preview per PR, edge functions     WebSockets (limited)

Netlify      Static sites, Gatsby/Hugo/Eleventy Node.js servers
             Jamstack, Forms, Identity          Stateful services
             SPA with external APIs             High-traffic databases

cPanel       WordPress, PHP sites               Docker containers
             Shared hosting, small budgets      Modern Node.js apps
             Simple domains & email             Microservices
             Non-technical users

Render       Full-stack Node/Python/Ruby apps   Very high traffic
             REST APIs with databases           Custom Kubernetes setups
             Cron jobs, background workers      Complex networking
             Replacing Heroku

Heroku       Quick prototypes, demos            Production at scale
             Learning platforms                 Budget-conscious deploys
             Simple apps                        (expensive at scale)

Railway      Same as Render                     Enterprise compliance
             GitHub-connected full-stack        Legacy enterprise stacks

AWS          Production at any scale            Quick prototyping
GCP          Everything Kubernetes, ML/AI       Zero infrastructure skill
Azure        .NET, Microsoft/enterprise stack   Simplicity seekers
──────────────────────────────────────────────────────────────────────────

Rule of thumb:
  Day 1 β†’ Vercel / Netlify / Render
  1,000 daily users β†’ Render / Railway with managed DB
  10,000 daily users β†’ Consider ECS, App Service, or Cloud Run
  100,000+ daily users β†’ Full cloud: EKS, GKE, or AKS

A Real Migration Path

Here is how a typical project evolves over time:

  1. Day 1 β€” Prototype: Deploy frontend to Vercel, API to Render, database to Render's managed PostgreSQL. Total cost: $0. Time to deploy: 15 minutes. Focus entirely on building product.
  2. Month 3 β€” Growing: Traffic increases. Render's free tier has limitations. Upgrade to Render Pro ($7/month per service). Still no infrastructure management.
  3. Month 12 β€” Scaling: 50,000 users, complex requirements. Migrate to AWS ECS or GCP Cloud Run for containerized services, RDS for the database, S3 for file storage. Use Terraform to manage it all.
  4. Year 3 β€” Platform: Multiple teams, multiple services. Move to Kubernetes (EKS or GKE). Implement ArgoCD for GitOps. Build an internal developer platform.

Each step is motivated by a real need, not by wanting to use impressive technology. Start simple. Move to complexity only when simplicity genuinely can't serve you anymore.

πŸ’‘ Tip: Don't Over-Engineer Early

Many developers deploy Kubernetes clusters for apps with 10 users. This is a classic mistake. The infrastructure complexity costs you time that should go toward building features and finding users. Vercel + Render + Supabase can handle tens of thousands of users. Add complexity only when you have evidence you need it β€” not because it seems more professional.

Chapter Summary

  • There is a spectrum from "click and deploy" (Vercel) to "manage everything yourself" (Kubernetes). Choose based on your actual needs, not the most impressive technology.
  • Vercel is the optimal platform for Next.js and React apps β€” push to GitHub, get a production URL with SSL and a global CDN in seconds.
  • Netlify excels at static sites and Jamstack, with built-in forms, identity, and split testing requiring zero backend code.
  • cPanel is the traditional shared hosting control panel β€” ideal for WordPress, PHP sites, and non-technical users; limited for modern containerized apps.
  • Render is the best Heroku replacement β€” full-stack apps, PostgreSQL, Redis, cron jobs, and background workers, all defined in render.yaml.
  • Start with simple platforms on day one; migrate to cloud infrastructure when you have a genuine need for the added complexity.
  • The migration path is: Vercel/Netlify β†’ Render β†’ Cloud Run/ECS β†’ Kubernetes. Each step should be driven by real scale requirements.