OkayStudy
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

Web Server

Twenty lines of that a will talk to.

A web server is just a program that waits for a request and sends a response. Build one from 20 lines of bash and netcat, then move on to Caddy with HTTPS.

A clerk behind a small window listens to a queue of visitors (a laptop, a phone and a small robot), each holding a request note, with a looping arrow above the window.
A web is a clerk at a window: wait, read the request, hand back the page, and wait again.

A web server is a program that answers

Strip away the and the logos and a web server is one 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 , 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 , 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 and the content, then closes the connection and loops round for the next visitor.
Nothing here is magic

Every server you have heard of — , , , the program () behind this very site — does the four steps above. The difference is that they do it for thousands of people at once, safely, over . 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.

Choose a pending booking to cancel. Each cancellation requires confirmation.

Your :

Close