https://github.com/nahumsa/booksapi
Restful API for a book database.
https://github.com/nahumsa/booksapi
Last synced: about 2 months ago
JSON representation
Restful API for a book database.
- Host: GitHub
- URL: https://github.com/nahumsa/booksapi
- Owner: nahumsa
- Created: 2020-08-18T14:17:38.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-26T18:38:46.000Z (over 4 years ago)
- Last Synced: 2025-02-16T10:13:48.086Z (4 months ago)
- Language: Go
- Homepage:
- Size: 7.29 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Books API using golang
[](https://app.getpostman.com/run-collection/a4e37324ec5fd722f252)
[](https://godoc.org/github.com/nahumsa/BooksAPI)## Introduction
This is an REST API that is constructed to read a database of books. This is based on the article from [Rahman Fadhil](https://blog.logrocket.com/how-to-build-a-rest-api-with-golang-using-gin-and-gorm/), where I adapted the implementation to use PostgreSQL. I also made a front end in order to search for books from a given author or a given id.## Usage
For the first time you run, use the `-reset` flag in order to create the database in your local computer. There is also a frontend that is on the `localhost:8080`.## Testing
All tests were made on postman and are shared on this [link](https://app.getpostman.com/run-collection/a4e37324ec5fd722f252) or in the button above.## Todo:
Things that I plan to implement on the future.
- [x] Create database
- [x] Migrate database
- [x] Add a flag to reset the database
- [x] Add books to the database
- [x] Delete books
- [x] Query all books
- [x] Query book id
- [x] Query selected author
- [x] Create a frontend
- [x] Show all books
- [x] Find a book using the ID
- [x] Find a book by the Author
- [x] Create tests
- [ ] Deploy on Heroku