This repo contains code written as part of a learning exercise for Go.
The project focuses on a small book API written using Fiber and Gorm. End points allow users to perform basic CRUD operations backed by a SQLite database.
The API is broken up into three distinct parts:
main.go
- Main package which kicks of the application. Routes and database setup are performed here.- database - Contains functions and variables for interacting with the SQLite database via Gorm.
- book - Struct and handlers for reacting to incoming HTTP request.
To run this project locally, you must have Go 1.16.3
installed on your machine. Installation instructions can be found here.
- Clone the repo:
git clone https://github.com/Nash0x7E2/learning-go.git
- Open
learning-go
in your favourite text editor or terminal:
cd learning-go
- Run main.go:
go run main.go
- Have fun 🎉