- Clone the repository
$ git clone https://github.com/prateek2211/backend-assignment.git
$ cd backend-assignment
- Setup virtual environment
$ virtualenv -p python3 venv
$ source venv/bin/activate
$ pip install -r requirements.txt
RabbitMQ is used as message broker to manage messages via queques for background process
- Install RabbitMQ
$ sudo apt install rabbitmq-server
- Verify that RabbitMQ is running
$ sudo systemctl status rabbitmq-server
- Next enter your API key in settings.py. To get an API key visit here
- Run database migrations
$ python manage.py makemigrations
$ python manage.py migrate
- Create superuser
$ python manage.py createsuperuser
- Start celery worker process
$ celery -A conf worker -B
- To run server open new terminal and enter the following command:
$ python manage.py runserver
Now open the browser and visit this link to browse API