API's for commerce services built on NodeJs
The server is built on nodeJS with expressJS framework, all the APIs can be accessed via swagger UI
Swagger Ui can be accessed after running server in local by --> (http://localhost:9050/api/docs)
Clone the project
git clone https://github.com/vedsharma04/commerce-services-api
Go to the project directory
cd commerce-services-api
Install dependencies
npm install
Start the server
npm run dev
NOTE : .env
file is required to to run locally
The server supports following APIs
POST /api/auth/register
POST /api/auth/login
GET /api/buyer/list-of-sellers
GET /api/buyer/seller-catalog/:seller_id
POST /api/buyer/create-order/:seller_id
POST /api/seller/create-catalog
GET /api/seller/orders
To run this project, you will need to add the following environment variables to your .env file
NODE_ENV = development
PORT = 9050
MONGO_DB_URI
- DB URI for connection
SALT_ROUNDS = 10
- could be changed according to preference
RSA_PRIVATE_KEY
- can be generated via file-path
RSA_PUBLIC_KEY
- can be generated via file-path
JWT_TOKEN_EXPIRY = 1d
- expiry time for jwt token, can be configured