This apllication is deployed on heroku
https://tessoedja.herokuapp.com/api/
Before starting to install the project, there're some things that need to be done first.
Make sure all of these are properly installed in your system.
Application | Download |
---|---|
Git | Windows / Linux |
Node.js | Link |
MongoDB | Link |
First, clone this repository into your system or you can run it from heroku.
To clone clone this repository https://github.com/hasbimsdd27/TesSoedja
To run it from heroku use this https://tessoedja.herokuapp.com/api/
If you clone this repository, after clone finish run npm i
to install the dependencies
In this app there are some endpoint that available
-
FindAll Product
To show all product use this endpoint
https://tessoedja.herokuapp.com/api/products?currentPage=1&pageSize=2
using methodGET
The value of currentPage and pageSize can be changed depend on you
this is the example
-
Create Product
To create product use this endpoint
https://tessoedja.herokuapp.com/api/products/new
using methodPOST
The request body must be JSON using following format :
{ "name":...., "description":...., "price":... }
this is the example
-
Inquiry Product (Create Invoice)
To Inquiry product use this endpoint
https://tessoedja.herokuapp.com/api/invoices/inq
using methodPOST
The request body must be JSON using following format :
{ "product_list": ..., "total_price": ... }
this is the example
-
Payment Product
To pay product use this endpoint
https://tessoedja.herokuapp.com/api/invoices/pay
using methodPATCH
The request body must be JSON using following format :
{ "invoice": ..., "status": ... enum['paid', 'pending'] }
this is the example
-
Register
To register new user use this endpoint
https://tessoedja.herokuapp.com/api/users/register
using methodPOST
The request body must be JSON using following format :
{ "username" : ..., "password" : ..., "isSeller" : ... Boolean(True,False) }
when user is registered, response will give the token from JSON Web Token. To use this, insert the token to the Authorization then chhose Bearer Token
this is the example
-
Login
To login use this endpoint
https://tessoedja.herokuapp.com/api/users/login
using methodPOST
The request body must be JSON using following format :
{ "username" : ... , "password" : ... }
when user is login, response will give the token from JSON Web Token. To use this, insert the token to the Authorization then chhose Bearer Token
this is the example
to build this app, stack that used is mentioned below
Application | Download |
---|---|
Node.js | Link |
MongoDB | Link |
Bcrypt | Link |
Cors | Link |
dotenv | Link |
express | Link |
jsonwebtoken | Link |
mongoose | Link |
paginate-info | Link |