Course of Raku / Functional, concurrent, reactive, and web programming / Web programming

A simple HTTP server

A server is the other side of a connection: instead of reaching out to a remote machine, it waits for clients to reach in. The same core class, IO::Socket::INET, does this too — you just put it in listening mode.

This section builds a tiny web server by hand: listen for a connection, read the request, and send back an HTTP response. Like the socket examples earlier, these need to be run on your own machine and connected to with a browser or another program.

Topics in this section

Practice

Complete the quiz that covers the contents of this section.

Exercises

This section contains 1 exercise. Examine all the topics of this section before doing the coding practice.

  1. Upper-case the path

Course navigation

Solution: Send and receive   |   Listening for connections