To setup the local backend follow the below steps:
-
Make sure you have mysql setup on your system -For Ubuntu, Linux Deb distributions: Run
sudo apt-get install mysql-server mysql clientAfter successfull installation, Runsudo mysqlCreate a new database and a user and assign requisite permissions as given here. -
After above steps, populate the config.py file accordingly.
-
On Ubuntu and Linux systems,
sudo service mysql startto start mysql server at the default port 3306 -
Create a virtual environment,
python3 -m venv <env_name> -
Run
pip install -r requirements.txtto install the requisite tools. -
Run
python3 manage.py makemigrations; python3 manage.py makemigrations shopBackend; python3 manage.py migrate- Note use python in place of python3 for windows.
You can start the development server as: python3 manage.py runserver
Clone the frontend repo from here. Follow steps mentioned in it's README.md to setup frontend in your system.
-Note: npm start should start the devleopment server mentioned at any of the hosts in the CORS_WHITELIST settings.py