/notes_api

A lightweight Django Rest Framework API for a notes app.

Primary LanguagePython

Notes Application

Technologies used : Django, Django Rest Framework, Docker.


A lightweight notes app build using django rest framework and made production ready using Docker.The Docker builds a global image of the system to run on any platform supporting docker in the form of containers.Each unit of the application has its separate container like database, web app, reverse proxy(Nginx), whose configurations and how they connect internally are managed by the docker-compose file.We havent used Nginx in the application due to lack of a domain and ssl certificates.

image image image image image

Setup


Clone the git repository locally:

git clone https://github.com/Apurva-Jyoti-paul/notes_api.git

Build and run the docker container[1]:

sudo sudo docker-compose up -d --build

Stopping a running container:

sudo docker-compose stop

Removing the volumes and containers:

sudo docker-compose down -v

API


After successfull deployment of the image containers our backend is up and running on : http://127.0.0.1:8000/

The application generally supports all type of crud operations for an app:

Here each note has an unique note id associated with it,you can view them using the get-notes functionality like http://127.0.0.1:8000/api/notes/

For more information on the notes-id feature checkout : note model

Debugging


To check running docker containers:

sudo docker container ls

To see all docker containers :

sudo docker container ls -a

To view logs of a particular container while facing some issue:

sudo docker logs [container_id]

Testing


One can use clients like Thunder Cient extension in Vscode or Postman to test these API's