In this tutorial I will illustrate how you can build your own RESTful API in Go and MongoDB.
API Specification The REST API service will expose endpoints to manage a list of friends. The operations that our endpoints will allow are:
GET /friends Get list of friends GET /friends/:id Find a friends by id POST /friends Create new friend PUT /firends Update a friend DELETE /firends Delete a friend Fetching Dependencies Before we begin, we need to get the packages we need to setup the API: