Links

API Setup

This document is the step by step guide for the setting up of Back End API for your eCommerce portal.
Step1 > Extract Source code, you will find api folder, then open your project directory terminal and give below commands
$ npm install
Step2 > Use bcrypt version according to node version.
Step3 > Database connectivity, mail and aws setup are given .env file. And also set the below urls in .env file
# after payment success, it will redirect to order list page of react store
STORE_URL = http://localhost:3000/account/myorders
# after payment cancel, it will redirect to home page of react store
CANCEL_URL = http://localhost:4205/
# its is api base url
BASE_URL = http://localhost:8000
# In email template redirection to store
STORE_REDIRECT_URL= https://localhost:3000/
# In email template redirection to admin
ADMIN_REDIRECT_URL= https://localhost:4200/
# In email template redirection to vendor
VENDOR_REDIRECT_URL= https://localhost:5000/
# image resize url
IMAGE_URL= https://localhost:8000/api/media/image-resize/
# Store forget password link
STORE_FORGET_PASSWORD_URL = http://localhost:3000/setPassword/
# Vendor forget password link
FORGET_PASSWORD_URL= http://localhost:5000/#/auth/set-password/
Step4 > To install the api doc give command in the terminal
$ npm install apidoc -g
Step5 > Import spurtcommerce.sql(which is in your api folder) in your database and give username,password, database name in .env file.
Step6 > To run the project give the following command in your terminal
$ npm start serve