Unit I · How your app runs
Three places your app lives
Most web apps run in three places at once: the visitor's browser, your server and a database. Knowing which part runs where tells you where a bug lives and what a visitor can see.
The browser
When someone opens your site, their browser downloads HTML, CSS and JavaScript and runs that JavaScript on their own device. Everything sent to the browser can be read by the visitor: it is all there in the browser's developer tools. Treat browser code as public.
The server
The server is a computer you rent, or a service that runs your code for you. It receives requests, runs your back-end code, talks to the database and sends back responses. Code that only runs on the server is never sent to visitors, which is why a rule such as "only the owner may delete this order" must be checked there.
The database
The database keeps what must outlive a single visit: accounts, orders, posts, settings. Visitors never talk to it directly; your server does, on their behalf.
Requests and responses
Every click that loads or saves something is an HTTP request: a method (GET to read, POST to send), a path such as /orders, headers and sometimes a body. The server answers with a status code, headers and a body. Codes in the 200s mean success, the 300s a redirect, the 400s a problem with the request (404 Not Found, 403 Forbidden) and the 500s a failure on the server.
Words to know
- Client
- the browser or app that sends requests
- Server
- the computer that answers them
- Status code
- the three-digit number that says how a request went
- HTTP
- the protocol browsers and servers use to talk
Sources
Checked October 17, 2026. Pages on other sites change; if a source no longer says what the lesson says, the source wins.