taham8875 / book-api

A simple Book API implemented in Golang. A Hello World project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Book API with Golang

This is a simple Book API implemented in Golang.

Introduction

This is a simple Book API implemented in Golang. It is a RESTful API that allows you to perform CRUD operations on a book resource.

This project is for the sake of learning.

Features

  • Create a book
  • Get all books
  • Get a single book
  • Update a book
  • Delete a book

Getting Started

To get started with this project, you need to have Golang installed on your local machine. You can download and install Golang from here.

# Clone the repository
git clone https://github.com/taham8875/book-api

# Change into the project directory
cd book-api

# Install dependencies from the go.mod file
go mod download

# Run the application
go run main.go

You may use a REST client like Postman to test the API endpoints.

Demo

ret.mp4

API Endpoints

Endpoint Method Description
/api/books GET Get all books
/api/books/{id} GET Get a single book
/api/books POST Create a book
/api/books/{id} PUT Update a book
/api/books/{id} DELETE Delete a book

About

A simple Book API implemented in Golang. A Hello World project.


Languages

Language:Go 100.0%