A technical assessment submission
There are 2 parts of this web application:
- Backend code
- Frontend code
To setup the application, first clone this repo and follow the steps to setup the backend and the frontend.
To set up the Backend, follow this steps:
- You need to have docker installed, if you do not, please download from https://docs.docker.com/get-docker/
- In your terminal or command prompt, open the folder of the cloned repo
- Navigate to
backend\productsApp
- In this directory, run the command
python manage.py migrate
, to create database tables, there is a default sqllite db created in the app. - Run the command
python manage.py loaddata products
to prepopulate the database. - Run the command
docker build -t products-app .
- Then run the command
docker run -it -p 8000:8000 products-app
- This will load backend app on the port 8000, if this is run on a local computer, it should be on localhost:8000
To set up the Frontend, follow this steps:
- You need to have npm installed, if you do not, please download from https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
- In your terminal or command prompt, open the folder of the cloned repo.
- Navigate to
frontend\products-front-app
- If you modified the url of the backend server, you need to update
REACT_APP_GRAPH_QL_BASE_URL
value in the .env file to match it. - In the directory mentioned in step 3, run the command
npm install
- Then run the command
npm start
- Browse/test the application.