Online shop API with the following features:
-
Product API:
- API to list all the products with - Step 1
- search: by title and description - Step 1.1
- sort: by price - Step 1.1
- API to list all the products with - Step 1
-
Checkout API:
- API to create an order - Step 2
- API to view single order - Step 2.1
- API to add product in order - Step 3
- API to update/delete product in order - Step 3.1
- API to purchase order - Step 4
- API to pay order - Step 5
- API to create an order - Step 2
To get a local copy up and running, please follow these simple steps.
Here is what you need to be able to run Cal.
- Node.js (Version: >=16.x <17)
- PostgreSQL
- Yarn (recommended)
-
Clone the repo
git clone https://github.com/mabc224/myos-test.git
-
Go to the project folder
cd myos-test
-
Install packages with yarn
yarn
-
Set up your .env file
Duplicate `.env.example` to `.env` Configure environment variables in the `.env` file.
-
Run migration
yarn migrate:dev
-
Run
# development $ yarn start # watch mode $ yarn start:dev
-
Visit
localhost:<port>/v1/products
in your browser.
Import open api docs into postman as collection.
docs/api-v1.yaml (For Swagger)
docs/eCommerece-Api.postman_collection.json (For Postman)
- Author - Arsalan Bilal
This app is MIT licensed.