A simple CRUD app that showcases how you can use Fiber and MongoDB together
- ensure you have the latest version of Go installed
- ensure that you have MongoDB installed and running
- clone this repo
- create a .env file in the root of the project and add the following:
MONGO_URI=mongodb://localhost:27017
PORT=8080
- run
go run main.go
in the root of the project
Returns all books
Returns a single book
Creates a new book
input:
{
"title": "test book",
"author": "me",
"year": "2022"
}
Updates a book
input:
{
"title": "test book",
"author": "me",
"year": "2022"
}
Deletes a book