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. As with the client, these examples 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 2 exercises. Examine all the topics of this section before doing the coding practice.

  1. A hello server
  2. An HTML response

Course navigation

Solution: Status with a client   |   Listening for connections