- Prerequiste
- Installation
- Create Environment Variable
- Start Development Server
- Postman Collection
- API Endpoint
- About Project
- Related Project
- Contributing
- Contact
- Node.js - Download and Install Node.js.
- MySQL - Download and Install MySQL
- Redis - Download and Install Redis
$ git clone https://github.com/azmprllynsa/tokosidia-API.git
$ cd tokosidia-API
$ npm install
DB_HOST=YOUR_DB_HOST
DB_USER=YOUR_DB_USER
DB_PASSWORD=YOUR_DB_PASSWORD
DB_NAME=YOUR_TABLE_NAME
PORT=YOUR_PORT
PORT_REDIS = YOUR_REDIS_PORT // default=6879
SECRET_KEY = YOUR_SECRET_KEY
URL_EMAIL_CONFIRM = YOUR_EMAIL_VALIDATION_PAGE_FRONTEND
EMAIL = YOUR_EMAIL_CONFIRMATION
PASSWORD = YOUR_EMAIL_PASSWORD
$ npm run serve
| No | HTTP Method | URI | Operation |
|---|---|---|---|
| 1 | GET | /api/v1/user/ | Get all users data |
| 2 | GET | /api/v1/user/:user_id | Get user’s data by it’s ID |
| 3 | POST | /api/v1/user/register | Register new user |
| 4 | POST | /api/v1/user/login | Login user |
| 9 | PATCH | /api/v1/user/:user_id | Edit or update the user’s data by it’s ID |
| 10 | DELETE | /api/v1/user/:user_id | Delete the user by it’s ID |
| No | HTTP Method | URI | Operation |
|---|---|---|---|
| 1 | GET | /api/v1/product/ | Get all products data |
| 2 | GET | /api/v1/product/:product_id | Get product’s data by it’s ID |
| 3 | GET | /api/v1/product/?page=1 | Get product’s data on the 1st page |
| 4 | GET | /api/v1/product/?search=product_title | Search product data by title keyword |
| 5 | GET | /api/v1/product/?sortBy=title | Sort product data by the title |
| 6 | GET | /api/v1/product/?sortBy=genre | Sort product data by the category |
| 7 | POST | /api/v1/product/admin | Insert new product data |
| 8 | PATCH | /api/v1/product/admin/:product_id | Update the product’s data by it’s ID |
| 9 | DELETE | /api/v1/product/admin/:product_id | Delete the product by it’s ID |
| No | HTTP Method | URI | Operation |
|---|---|---|---|
| 1 | GET | /api/v1/order | Get all orders data |
| 1 | GET | /api/v1/order/:user_id | Get all orders data by user ID |
| 2 | GET | /api/v1/order/:order_id | Get order’s data by order ID |
| 9 | POST | /api/v1/order/ | Insert new order data |
| 9 | PATCH | /api/v1/order/:order_id | Edit or update the order’s data by it’s ID |
| 10 | DELETE | /api/v1/order/:order_id | Delete the order by it’s ID |
Tokosidia is a project inspired by one of Unicorn in Indonesia, Tokopedia. It's API made for Tokodidia using Node Js and Express Js
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
Fork the Project
- Create your Feature Branch
git checkout -b [feature] - Commit your Changes
git commit -m 'Add some feature' - Push to the Branch
git push origin [feature] - Open a Pull Request
|
Rahmat Hidayatullah |
Firman |
azmprllynsa |
Muhammad Yusuf |
Sulfikardi |
Copyright © 2020 Azmi Prilly Naisa