课程: Go Essentials: Concurrency, Connectivity, and High-Performance Apps

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Challenge: Key-value database

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.

内容