One of Go's biggest and most successful applications is the creation of web servers. In this section, we will see what a web server actually is, how the HTTP protocol works, and how to implement a web server application using both the standard library and third-party packages.
Web servers in Go
Web server
A web server application is software that can serve content using the HTTP protocol (and some other related ones) over a TCP/IP network. There are many well-known web server applications, such as Apache, NGINX, and Microsoft IIS. Common server use case scenarios include the following:
- Serving static files, such websites and related resources: HTML pages, images, style sheets, and scripts.
- Exposing a web application...