Testing the RESTful Server

This lesson shows how to test the RESTful server using the curl(1) utility. We should test the RESTful server as much and as extensively as possible to find bugs or unwanted behavior. As we use two files for the server implementation, we need to run it as go run main.go handlers.go. Additionally, do not forget to have PostgreSQL up and running. We begin by testing the /time handler, which works with all HTTP methods:

Get hands-on with 1200+ tech skills courses.