go_movies_crud

Build a CRUD API with Golang

Overview

This code essentially sets up a basic server for managing a list of movies, allowing clients to perform CRUD operations on the movie collection through HTTP requests.

Features

Installation

Prerequisites

Setup

To set up the routes which mean endpoints, you need to install the gorilla/mux. You can do this by running:

go get -u github.com/gorilla/mux

Usage

Click on the <> Code button and download the file by selecting Download ZIP. Once the download is completed, open the downloaded file in your IDE such as GoLand.

To start the application, run the following command in the terminal:

go run main.go

Navigate to http://localhost:8000/movies in your web browser. Enter an {id} number after 8000/movies/, the application will display the movie’s information including id, isbn, title and director in a dictionary format.

Application’s Files

References

Sharma, Akhil. 2021. 2. Build A CRUD API With Golang, Building 11 Projects. YouTube
*Also the code includes Automated API test monitors by Postman.