https://github.com/rasbeetech/library-microservice
API service for keeping track of books.
https://github.com/rasbeetech/library-microservice
api api-rest chai css expressjs html javascript mocha mongodb mongoosejs nodejs npm
Last synced: about 2 months ago
JSON representation
API service for keeping track of books.
- Host: GitHub
- URL: https://github.com/rasbeetech/library-microservice
- Owner: RasbeeTech
- License: mit
- Created: 2021-06-18T15:42:00.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-18T21:25:04.000Z (almost 4 years ago)
- Last Synced: 2025-01-25T10:26:17.399Z (3 months ago)
- Topics: api, api-rest, chai, css, expressjs, html, javascript, mocha, mongodb, mongoosejs, nodejs, npm
- Language: JavaScript
- Homepage:
- Size: 60.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Library-Microservice
API service for keeping track of books.
### Purpose:
Practice implementing unit and integrated Mocha Chai-HTTP testing.
### Usage examples:
Get all books in library:
```
GET /api/books
```
Get a single book in library:
```
GET /api/books/{book_id}
```
Add book to library:
```
POST /api/books/ [title: book_title]
```
Add comment to book:
```
POST /api/books/{book_id} [title: book_title]
```
Delete all books in library:
```
DELETE /api/books
```
Delete one book from library:
```
Delete /api/books/{bood_id}
```### Return example:
```
{"comments":[],"_id":"60cd040617f00e9416f1df9d","title":"example book","commentcount":0, "comments": ["good example", "great service"]...}```