Skip to content

πŸ“– A simple REST API that allows people to borrow books from a library

Notifications You must be signed in to change notification settings

nadiannis/libry-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Libry API

πŸ“– A simple library REST API πŸ“–


Table of Contents

Description

^ back to top ^

Libry API is a simple REST API that allows people to borrow books from a library. This project is made with Go. It is created as an exercise in the Go phase of the Backend Development Training.

Features

^ back to top ^

  • View list of users & their currently borrowed books.
  • Add a new user.
  • View list of books.
  • Add a new book.
  • View list of borrowed books.
  • Borrow a book.
  • Return a book.

Entities

^ back to top ^

There are 3 entities: Book, User, & Borrow.

Book

  • id: string
  • title: string
  • author: string

User

  • id: string
  • username: string
  • books: []*Book

Borrow

  • id: string
  • user_id: string
  • book_id: string
  • start_date: timestamp
  • end_date: timestamp
  • status: string

Run Locally

^ back to top ^

  • Make sure you have Go installed on your computer.

  • Clone the repo.

    git clone https://github.com/nadiannis/libry-api.git
    cd libry-api
  • Install the dependencies.

    go mod tidy
  • Run the server. The web server will run on port 8080.

    go run ./cmd

About

πŸ“– A simple REST API that allows people to borrow books from a library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages