Code Family

CODE FAMILY LEARNING HANDBOOK · BEGINNER EDITION

Where does a website actually live?

Servers, serverless, Vercel, Cloudflare Workers, VPS, databases and more. Learn the ideas in plain language, one step at a time.

“Start with what your project needs, not the most complicated technology you can find.”
Explore the handbook
yourwebsite.com
Request ↔ Response
SERVERRuns the work
Start simpleEveryday examples before technical terms.
Compare honestlyUnderstand cost, control and responsibility.
Build safelyLearn production basics, not just deployment.

YOUR ROADMAP

Table of contents

Search a topic or choose a chapter. Follow the order if this is your first time learning about hosting.

CHAPTER 01

Start with the big picture

Imagine ordering food. You make a request, a kitchen does the work, and someone brings back the result. A website works in a similar way: your browser asks for something, a computer or service processes the request, and a response comes back.

1Your browserYou open a page or tap a button.
2InternetThe request travels to the right service.
3ServerIt returns a page or processes data.
4Your screenThe result appears.
Important: a website is not always one thing on one machine. The page, API, database, images and background jobs may live in different services.

CHAPTER 02

What is a server?

A server is a computer or software that provides something to other computers. The word can mean the physical machine, the program listening for requests, or the role that computer plays.

Everyday analogy

A shop has a counter where customers place orders. The customer is the client; the shop worker or service is the server. The server receives a request and returns a response.

What might a server do?

  • Send HTML, CSS, JavaScript and images to a browser.
  • Check a password and decide whether a user can sign in.
  • Save an order in a database.
  • Send an email or process a payment request.

A server needs somewhere to run. That could be a VPS, a data centre, a cloud platform or a serverless runtime managed by a provider.

CHAPTER 03

Static websites and shared hosting

A static website serves files that have already been prepared, such as HTML, CSS, JavaScript, images and fonts. “Static” does not mean the page cannot have animation or interactivity. JavaScript can still run in the visitor's browser.

Good fit: portfolios, documentation, landing pages, brochures and simple front ends that call a separate API.

Shared hosting: many customers use the same physical server. It can be affordable and simple, especially for conventional websites, but you usually have less control over the underlying system.

A static website can still use a database or login, but those features need an API or backend service somewhere else. Never put database passwords or private API keys in browser JavaScript.

CHAPTER 04

Serverless and edge computing

Serverless does not mean there are no servers. It means the provider manages much of the infrastructure, so you focus more on code and less on operating a machine.

A function might run when a user signs in, submits a form, or calls an API. Depending on the platform, it may scale automatically and be billed by requests, execution time, CPU or other usage measures.

What is edge computing?

Edge code runs in locations distributed closer to users, where the platform supports it. This can reduce the time needed for some requests. Not every workload belongs at the edge: long-running processes, local system dependencies or specialised runtimes may need another host.

Cloudflare Workers is one example of a platform for running code on Cloudflare's network. Check its runtime compatibility, limits, pricing and storage options before choosing it for a particular application.

CHAPTER 05

What is Vercel?

Vercel is a platform for building and deploying web applications. Developers commonly connect a Git repository, configure the project, and let the platform build and deploy it. It supports frameworks including Next.js and provides features such as preview deployments.

Vercel is a product/platform; serverless is a computing model. They are related but not interchangeable terms. A platform can combine builds, static hosting, functions, routing, caching and other services.

Typical workflow

  1. Push code to GitHub.
  2. Connect the repository to the hosting platform.
  3. Set build commands and environment variables.
  4. Deploy and test the preview.
  5. Attach a domain, review logs and monitor usage.

Compare current plan limits and pricing before production use. Framework compatibility, function duration, regional needs and data transfer can matter as much as the advertised starting price.

CHAPTER 06

What is a VPS?

A Virtual Private Server is a virtual machine with allocated resources on a larger physical host. You usually receive an operating system, administrator access and the freedom to install software.

Everyday analogy

Managed serverless is like renting a serviced room where staff handle most building maintenance. A VPS is like renting your own flat: you can arrange it your way, but you are responsible for much more.

You may need to manage

  • Operating system updates and firewall rules.
  • SSH keys, users and permissions.
  • Web server, runtime and process management.
  • Database security, backups and restore tests.
  • Monitoring, disk space, TLS certificates and incidents.

A VPS can be useful for persistent processes, custom software, self-hosted tools or workloads that need more control. The monthly server price is not the full cost: include your time, backups, monitoring and recovery planning.

CHAPTER 07

Other hosting models

Dedicated server
A physical server allocated to one customer. It offers substantial control, but maintenance and cost can be higher.
PaaS — Platform as a Service
A platform handles much of the infrastructure and application deployment. You focus on your app and its configuration.
IaaS — Infrastructure as a Service
You rent infrastructure such as virtual machines, networks and disks, then manage more of the software stack.
Managed hosting
A provider takes responsibility for selected operational tasks. Confirm exactly what is included.

CHAPTER 08

Containers, Docker and Kubernetes

A container packages an application with many of the files and dependencies it needs. This can make it easier to run the same app in development, testing and production.

Docker is widely used to build and run containers. A container still runs on infrastructure provided by a laptop, VPS, cloud host or container platform.

Kubernetes helps manage groups of containers across machines. It is powerful, but adds operational complexity. A small app usually does not need Kubernetes just because it is popular.

Start with the simplest deployment that reliably runs your app. Add containers or orchestration when you have a real need, not merely because they sound advanced.

CHAPTER 09

Databases and file storage

Your application code and your data are different things. Redeploying the code should not accidentally erase customer accounts, orders or business records.

  • Relational database: structured records in tables, often queried with SQL. Examples include PostgreSQL and MySQL.
  • Object storage: files such as photos, PDFs, audio and backups.
  • Cache or key-value store: quick lookups, temporary data or application state, depending on the service.

A managed database can reduce maintenance work, but you still need access controls, backups, restore tests, sensible connection limits and a plan for migrations. Store credentials as server-side secrets, not in public frontend code.

CHAPTER 10

Compare the options

OptionBest forControlOperations
Static hostingDocs, portfolio, landing pagesLow server controlLow
Serverless functionsAPIs, events, short tasksRuntime-dependentLow to medium
Vercel-style platformWeb app deployment and previewsPlatform-dependentLow to medium
VPSCustom services and persistent processesHighHigh
Dedicated serverSpecific high-control workloadsVery highHigh
Managed databaseReliable application dataDatabase-levelLower than self-hosting

These are broad patterns, not guarantees. Check actual limits, pricing, regions, support, compliance needs and workload compatibility for each provider.

CHAPTER 11

Choose for your project

Portfolio or documentation

Start with static hosting

Usually low maintenance and a good fit for HTML, CSS, JavaScript and media files.

Modern web application

Use a deployment platform

Useful when you want Git-based deploys, previews and framework integration.

Small API or event handler

Consider serverless

Good when requests are supported by the platform's runtime and execution limits.

Custom long-running process

Consider a VPS or suitable container host

Check patching, uptime, backups and ongoing operations before choosing.

Business app with customer data

Plan the database separately

Choose a data service, define permissions, and test backup restoration before launch.

CHAPTER 12

Security and production basics

  • Use HTTPS and protect domain and hosting accounts with strong authentication.
  • Keep private keys, tokens and database credentials out of public repositories and browser code.
  • Apply least-privilege permissions and remove unused credentials.
  • Back up important data and test that a restore actually works.
  • Monitor errors, uptime, resource usage and unexpected cost changes.
  • Update dependencies and operating systems, and test changes before production.
  • Use staging or preview deployments for risky changes where possible.
  • Document how to recover if a deployment or database migration fails.
Remember: a successful deployment only means code was published. It does not prove the application is secure, backed up, affordable or ready for real customers.

CHAPTER 13

Glossary

API
A defined way for software systems to request information or actions from one another.
DNS
The system that maps domain names to information needed to find services on the internet.
Domain
A readable internet name, such as example.com.
Deployment
Publishing a version of an application to an environment.
Environment variable
A configuration value supplied to a process. Sensitive values must be handled as secrets.
Runtime
The environment that executes your application code.
Latency
The delay before a response arrives.
Scaling
Adjusting capacity to handle changing demand.
Uptime
The time a service is available and working.

CHAPTER 14

Test your understanding

Choose an answer for each question, then check your result.

1. What does serverless mean?

2. What is a common trade-off with a VPS?

3. Where should a private database password go?

CHAPTER 15

Official learning resources

Use provider documentation for current capabilities, limits and pricing because these can change.

CHAPTER 16

More platforms and services

Hosting is an ecosystem, not a single product. Most real applications combine several services. Pick each service for a clear job instead of putting everything on one provider by default.

Cloudflare Pages, Workers and R2

  • Pages: publish static sites and supported frontend builds from a Git repository.
  • Workers: run request handlers, APIs and event-driven code on Cloudflare's runtime.
  • R2: object storage for uploads, images, PDFs, exports and backups. It is not a relational database and should not replace PostgreSQL for structured business records.

A common architecture is Pages for the frontend, Workers for API logic, a managed database for structured records, and R2 for user-uploaded files. Check current limits, access controls, egress rules and pricing in the official documentation.

Where can Python applications run?

Python needs a host that supports the kind of process you want to run. A web API, scheduled job, notebook and always-on worker may have different requirements.

Provider or platformInvestigate it forCheck before choosing
RenderWeb services, background workers and scheduled jobsPlan limits, sleep behaviour, persistent disks and database costs
RailwayDeploying applications and supporting services from a projectUsage-based charges, resource limits and service persistence
PythonAnywherePython web applications and beginner-friendly workflowsFramework support, scheduled tasks, outbound access and plan limits
KoyebContainerised and web applicationsRegions, instance types, scale-to-zero behaviour and pricing
Google Cloud RunContainerised HTTP services and jobsContainer setup, request timeouts, scaling settings and billing
DigitalOceanManaged app platforms, databases and virtual machinesWhether you need a managed platform or the maintenance burden of a VPS
Oracle Cloud InfrastructureCloud compute and infrastructure servicesRegional availability, capacity, eligibility, quotas and billing terms
AWSBroad cloud infrastructure and managed application servicesService complexity, permissions, networking and total cost

This is a shortlist for research, not a promise that every provider offers a free tier or supports every workload. Product names, free allowances, prices and regional availability change; verify them on the official pricing pages.

Managed hosting versus a VPS

With managed hosting, the provider handles more of the operating system, runtime, deployment workflow or database maintenance. With a VPS, you normally take responsibility for operating-system updates, firewall rules, process supervision, monitoring, backups and recovery. A managed service can cost more per month but save time and reduce operational mistakes.

Plan the real monthly cost

  • Compute or hosting plan
  • Database storage, compute and backups
  • File/object storage and data transfer
  • Email delivery, SMS and payment-provider charges
  • Domain renewal, monitoring and logs
  • Extra usage, overages, backups and recovery capacity
Practical rule: start with the smallest reliable architecture that meets your needs, set billing alerts where available, test backups, and review actual usage before scaling up. “Free” usually means limited by quotas, features, time or eligibility.

Quick selection guide

  • HTML/CSS/JS documentation: static hosting such as Cloudflare Pages or GitHub Pages.
  • Frontend plus small API: a deployment platform or serverless runtime, if its limits fit.
  • Python API: choose a Python-friendly platform or container host.
  • Uploads and media: object storage such as Cloudflare R2.
  • Users, orders and transactions: a properly secured managed relational database may be a good starting point.
  • Long-running custom services or full machine control: consider a VPS only if you can maintain it.

BUILD WITH CODE FAMILY

Ready to put your website online?

Code Family shares practical learning resources and builds websites and web applications for businesses.

www.christech.co.ke · WhatsApp +254701059192