Clone this repo by
git clone https://github.com/goofynugtz/Flipr-notesAPI-task.git
Create a virtual environment for running it locally without docker for debugging/dev
python -m venv venv && pip install -r requirements.txt
For the purpose of task submission, The secret keys are exposed in .env.example file
Rename the .env.example to .env
To start docker container
sudo docker-compose up --build
The application supports CRUD operations at the following endpoints
Method | Description | Address |
---|---|---|
GET | All notes | http://127.0.0.1:8000/api/ |
GET | Note by id | http://127.0.0.1:8000/api/[NOTE_ID]/ |
POST | Create new | http://127.0.0.1:8000/new/ |
DELETE | Delete by id | http://127.0.0.1:8000/api/[NOTE_ID]/delete/ |
PUT | Update by id | http://127.0.0.1:8000/api/[NOTE_ID]/update/ |
Check running instances and logs by
sudo docker ps
sudo docker image
sudo docker container ls
sudo docker container ls -a
sudo docker logs [container_id]
To reset database container
sudo docker volume prune
To open sh inside a container
sudo docker exec -it <container> sh