Includes:
- Django
- Django REST Framework
- MongoDb ORM
- Celery
- Docker
- Swagger API Docs
Steps:
- Install Cookiecutter:
pip install cookiecutter
- Startproject:
cookiecutter gh:cyantarek/djmicro2
- Answer questions and give your service a name
- cd into the folder
- Install requirements:
pip install -r requirements.txt
- Run server:
python manage.py runserver
- Run celery:
celery -A api workder -l info
- Start rabbitmq, mongodb and configure them in settings.py and
python manage.py makemigrations
andpython manage.py migrate
- Create Celery tasks in tasks.py
- Hello World API endpoint:
127.0.0.1:8000/api/v1/hello/
- Swagger API Docs endpoint:
127.0.0.1:8000/api/v1/docs/