PES
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 PES 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 PES, reload the page, and use the bell to enable notifications.

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

My learning progress
  1. How to use AI
  2. Terminal commands
  3. Advanced AI
  4. Vibe coding
  5. AI certification Getting ready
  6. Keyboard
See details
All Vibe Coding topics
VIBE CODING

Web Server

Twenty lines of shell that a browser will talk to.

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

What actually travels down the wire

Open the connection and you find plain text you could have typed yourself. This is the whole reason the shell is possible — and the reason you can a web problem by reading, rather than guessing.

The request the browser sends

request
GET / HTTP/1.1
Host: localhost:8084
User-Agent: Mozilla/5.0
Accept: text/html
  • The first line is the only part our server reads: the method (GET means fetch, POST means send something), the path, and the protocol version.
  • Host says which site is wanted. One server can hold hundreds of domains on one address, and this header is how it tells them apart.
  • The rest are the introducing itself: what software it is, what formats it can read, what languages it prefers. A server may use them or ignore them.

The response the server sends

response
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Connection: close

<h1>Hello</h1>
  • The status line: the protocol version and a code saying how it went. 200 means the request succeeded.
  • Content-Type tells the browser how to read what follows. Send HTML with the wrong type and the browser will show your tags as text instead of a page.
  • The charset part is not optional in practice. Without it, any non-English text is likely to arrive as garbled characters.
  • Then one blank line, and everything after it is the content. That blank line is the entire border between the headers and the page.

Status codes worth knowing

CodeMeaning
200 OKSuccess. The response contains what was asked for. Codes in the 200s all mean some flavour of that.
301 Moved PermanentlyIt moved, permanently. The new address is in the Location header and the browser follows it automatically — this is how a site sends visitors from http to https.
404 Not FoundThe server is fine but that path does not exist. Codes in the 400s mean the problem is in the request.
500 Internal Server ErrorThe server broke while handling a perfectly good request. Codes in the 500s mean the problem is yours to fix, and the details are in the server log.

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.

Guidelines

AI

AI Certification

Study

Vibe Coding

Game

Practice

Tutors

Chat

Forum

Create

Community

More

Glossary

Pick a word you don't know. You'll see a simple explanation and related terms.

No matching term yet.

Pick a term to see its explanation.