An API for creating and managing tasks.
- Create a new task-list.
- Update a task-list.
- Fetch a task-list.
- Delete a task-list.
- Create a new task in a task-list.
- Update a task in a task-list.
- Fetch a task.
- Fetch all tasks in a task-list.
- Delete a task in a task-list.
Please see the openapi contract for API endpoints and details.
- This application requires Java 11.
- Please refer to the following link to download and install Java-11: Java-11
- This application requires MySQL 8.
- Please refer to the following link to download and install MySQL-8: MySQL-8
- To create database and user you can run following script: db_setup.sql
- Clone the repository.
- Open the project in IntelliJ IDEA or any suitable IDE of your choice.
- Add following environment variables in configurations:
- DB_HOST
- DB_NAME
- DB_PASSWORD
- DB_PORT
- DB_USERNAME
- In IntelliJ IDEA, environment variables can be added from Run -> Edit Configurations -> Environment Variables
- Run the project.
-
Install Docker from: Docker
-
In terminal switch to project directory.
-
Use following command:
docker build -t todo-api:1.0.0 .
-
Above command will build the image.
-
Now run the following command:
sudo docker run todo-api:1.0.0 -e "DB_HOST=<DB_HOST>" -e "DB_PORT=<DB_PORT>" -e "DB_NAME=<DB_NAME>" -e "DB_USERNAME=<DB_USERNAME>" -e "DB_PASSWORD=<DB_PASSWORD>" -p 8080:8080 -d
-
Change the actual variable value in angle brackets.
-
It will spin up a container which can be accessed on
http://localhost:8080/
- Unit Testing
- How to deploy with docker on ubuntu
- How to deploy with Azure Web App Service
- Authorization & Authentication