March 2019
Beginner to intermediate
324 pages
7h 17m
English
The next step to implement a RESTful API is to define the different URLs that correspond to the different API actions we need to happen. This is also known as defining routes, since the URLs are the routes to our API resources.
We'll go through the RESTful API interactions one by one and define their routes. But first, let's start by creating a new file for our RESTful API.
In the backend/src folder, create a new folder called rest. Inside the rest folder, create a file called rest.go. This is where we start using the Gin framework. In your favorite Terminal, type the following command in order to deploy and install the Gin framework to your development environment:
go get -u github.com/gin-gonic/gin
In the rest.go file, ...
Read now
Unlock full access