From the course: Go Essentials: Concurrency, Connectivity, and High-Performance Apps
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Challenge: Key-value database - Go Tutorial
From the course: Go Essentials: Concurrency, Connectivity, and High-Performance Apps
Challenge: Key-value database
(upbeat music) - In this exercise, you need to implement a server for a key value database. Here, we have our server struct which contains a DB which is a database that has a get and a set methods. I already written the DB for you so you don't need to write it. And you have the database handler where you need to write the work. And finally, you need to do routing and start the server. The API should be, if I'm doing curl -d to the server it is going to set the key. Otherwise, if I'm doing just getting, I'm going to get the key. And if I'm going to a key that does not exist, it should return not found. Limit the value size to one kilobyte.