Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/narotam-mishra/book-apis-backend
created a RESTful API for managing a simple book database using Node, Express js & MongoDB . The APIs will allow us to perform Create, Read, Update, and Delete (CRUD) operations on book records.
https://github.com/narotam-mishra/book-apis-backend
dotenv express git middleware mongoose nodejs nodemon
Last synced: about 2 months ago
JSON representation
created a RESTful API for managing a simple book database using Node, Express js & MongoDB . The APIs will allow us to perform Create, Read, Update, and Delete (CRUD) operations on book records.
- Host: GitHub
- URL: https://github.com/narotam-mishra/book-apis-backend
- Owner: Narotam-Mishra
- Created: 2024-03-29T07:42:42.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-29T09:57:08.000Z (10 months ago)
- Last Synced: 2024-03-29T10:53:59.375Z (10 months ago)
- Topics: dotenv, express, git, middleware, mongoose, nodejs, nodemon
- Language: HTML
- Homepage: https://book-apis-backend-naru.onrender.com/
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## [book-apis-backend](https://book-apis-backend-naru.onrender.com/)
### Setup
```npm install && npm run dev```### Database Connection
1. Import connectDB.js from db
2. Invoke in start()
3. setup .env in the root
4. Add mongoURL with correct value### Routers
- [bookStoreRoutes.js]### Book Model
- [bookModel.js]### CRUD APIs (Controllers)
- [create Book](https://book-apis-backend-naru.onrender.com/api/v1/book)
- [Get All Books](https://book-apis-backend-naru.onrender.com/api/v1/book)
- [Get Single Book](https://book-apis-backend-naru.onrender.com/api/v1/book/6606896e4b14922c2e1e443a)
- [update Book](https://book-apis-backend-naru.onrender.com/api/v1/book/6606896e4b14922c2e1e443a)
- [Delete Book](https://book-apis-backend-naru.onrender.com/api/v1/book/6606896e4b14922c2e1e443a)### Tested all Book APIs using Postman
- [Postman Collection Link](https://schema.postman.com/json/collection/v2.1.0/collection.json)### Additionally added API documention using Docgen library
- [Docgen Library](https://github.com/thedevsaddam/docgen)
- Export Postman Collection
- Make sure the postman's collection and windows_amd64.exe should reside in same folder
- Run below command using command prompt
- windows_amd64 build -i book-store-APIs.postman_collection.json -o index.html
- A index.html file will be generated then place place that file under public folder
- Use this code to host static html file ```server.use(express.static('./public'));```