Learning about Julia's web stack
Julia's package ecosystem has long provided a variety of libraries for building web apps. Some of the most mature are HttpServer
, Mux
, WebSockets
, and JuliaWebAPI
(to name just a few; this list is not exhaustive). But as the ecosystem settled with Julia version 1, a lot of community effort has been put into a newer package, simply known as HTTP
. It provides a web server, an HTTP client (which we already used in the previous chapters to fetch the web pages from Wikipedia), as well as various utilities for making web development simpler. We'll learn about key HTTP
modules ,such as Server
, Router
, Request
, Response
, and HandlerFunction
, and we'll put them to good use.
Beginning with a simple example – Hello World
Let's take a look at a simple example of employing the HTTP
server stack. This will help us understand the foundational building blocks before we dive into the more complex issue of exposing our game on the web.
If you followed the previous chapter, you...