SONUB home EN English 한국어 日本語 中文 हिन्दी বাংলা اردو Español Português Français Deutsch Русский العربية Bahasa Indonesia Tiếng Việt ไทย Türkçe

How to enable notifications

Notifications are unavailable in this browser or on this address. Try a supported browser on the secure SONUB site.

If notifications are blocked, allow them in your browser settings.

  1. Open the site controls beside the address bar, or your browser’s site settings. Set Notifications for this site to Allow.
  2. In your device settings, allow notifications for your browser and check Do Not Disturb or Focus.
  3. Return to SONUB, reload the page, and use the bell to enable notifications.

On iPhone or iPad, add SONUB to your Home Screen, open it there, then allow notifications.

All Vibe Coding topics
VIBE CODING

Web Server

Twenty lines of that a will talk to.

A web is simply a that waits for a and sends a . To prove it, we build one out of bash, and a — you can read every line of it — and then move to Caddy, the server that runs real sites with included.

A web server is a program that answers

Strip away the racks and the logos and a web server is one program doing one thing in a loop: wait for someone to connect, read what they asked for, send text back, and go back to waiting.

The word server means two things and people mix them up constantly. There is the machine sitting in a data centre, and there is the program listening on a . Here we mean the program — and it runs just as happily on the laptop in front of you.

One visit, four steps

  1. ListenThe program claims a port — 8084 in our example — and waits. A port is just a numbered door on the machine, so two programs cannot hold the same one.
  2. Read the requestA browser connects and sends a few lines of text. The first line says which method and which path it wants, for example a of the path /.
  3. DecideThe server works out what to send: read a file from disk, run some , query a . Our example always sends the same file, which is the only reason it fits in twenty lines.
  4. Respond and closeIt writes a , a few , one blank line and the content, then closes the connection and loops round for the next visitor.
Nothing here is magic

Every server you have heard of — Apache, Nginx, Caddy, the Node process behind this very site — does the four steps above. The difference is that they do it for thousands of people at once, safely, over HTTPS. The shape is identical.

You mark this yourself. Nothing is graded here.

Mark this step as understood?

This cannot be undone yet, so mark it only when you really understand.

Marked as understood

You mark this yourself. Nothing is graded here.