Anime CRUD Microservice
This is a simple CRUD microservice which is a rest api written in Golang, Gorilla as development framework and MongoDB as the database. It is deseigned for saving and manipulating anime records
Setup
Clone repository
git clone https://github.com/Debetome/Anime-CRUD-microservice.git
Declare environment variables
Windows
set MONGO_HOST=localhost
set MONGO_PORT=27017
set MONGO_USER=user
set MONGO_PASSWORD=password123
SET MONGO_DBNAME=dbname
Linux
export MONGO_HOST=localhost
export MONGO_PORT=27017
export MONGO_USER=user
export MONGO_PASSWORD=password123
export MONGO_DBNAME=dbname
NOTE: The ‘MONGO_PORT’ variable is just optional, in case you have the mongodb service running on a different port
Run project
go run main.go
Endpoints
/get-animes
It fetches all anime records from the database
/get-anime/{id}
It fetches only one anime record
/new-anime
It creates a new anime record (it receives a json body)
/update-anime/{id}
It updates or edits a anime record (it receives a json body)
/delete-anime/{id}
It deletes a anime record from the database