Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zeroonedev01/express-backend-rent-book-app
https://github.com/zeroonedev01/express-backend-rent-book-app
database express jwt mysql postman
Last synced: about 13 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/zeroonedev01/express-backend-rent-book-app
- Owner: zeroonedev01
- Created: 2019-08-14T16:01:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-01T04:47:18.000Z (about 5 years ago)
- Last Synced: 2023-12-28T11:47:20.660Z (11 months ago)
- Topics: database, express, jwt, mysql, postman
- Language: JavaScript
- Size: 60.5 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Rent Book RESTfull API
Built with Express.js and Mysql.## Table of Contents
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Features](#features)
- [Built With](#built-with)
- [Requirements](#requirements)
- [Usage for Development](#usage-for-development)
- [Setup .env file](#setup-env-file)
- [End Points](#end-points)
- [Contributor](#contributor)## Introduction
This is my repository containing a Rest Full API backend Rent Book app, this API is builded with Mysql and Express.JS## Features
* Register and Login with JWT
* CRUD Books
* CRUD Genre
* Sorting
* Filtering
* Pagination
* Search a books
* Rent or returning a book## Built With
[![React Native](https://img.shields.io/badge/Express%20-4.17.1-blue.svg?style=rounded-square)](https://expressjs.com/)
[![Node.js](https://img.shields.io/badge/Node.js-v.10.16.2-green.svg?style=rounded-square)](https://nodejs.org/)
[![MySQL](https://img.shields.io/badge/MySQL-v.10.16.2-orange.svg?style=rounded-square)](https://www.npmjs.com/search?q=mysql)
[![jsonwebtoken](https://img.shields.io/badge/JWT-v.8.5.1-critical)](https://www.npmjs.com/package/jsonwebtoken)## Requirements
* node.js
* npm
* postman (installer or chrome extension)
* code editor (visual studio code recommend)
* mysql (xampp)## Usage for Development
* Clone this repository https://github.com/tejojr/express-backend-rent-book-app.git
* Open CMD or Terminal and enter to the app directory
* Type in Terminal npm install to install the required packages.
* Setup .env file
* Run MySql
* Create database and run example.sql script to install the necessary database structure
* Open Postman for testing API## Setup .env file
* In windows OS, you can open command prompt, change directory to your project directory.
Example,
My project directory
```
E:\my_project
```
* Then you can type,
```
copy .env.example .env
```
* Then Setup .env## End Points
1. Genre
* Post
```
host/rentapp/genres
```
* Get
```
host/rentapp/genres
host/rentapp/genres?page=1&limit=2&sort=name:desc
```
* Patch
```
host/rentapp/genres/:id
```
* Delete
```
host/rentapp/genres/:id
```
2. Book
* Post
```
host/rentapp/books/
```
* GET
```
host/rentapp/books?sort=title:desc&available=true&page=1&limit=2
```
* Patch
```
host/rentapp/books/:id
```
* Delete
```
host/rentapp/books/:id
```3 Borrow
* Post Borrow
```
host/rentapp/borrows
```
* Patch returnbook
```
host/rentapp/borrows/:id
```
* getBorrow
```
host/rentapp/borrows/
```4.user
* post sign
```
host/rentapp/users/signin
```
* post signup
```
host/rentapp/users/signup
```## Contributor
Ammar Annajih Pasifiky