This code is to be done at home. Design and implement a deployable RESTful API backend that store the resource for a simple 'to do' task list.
- Install Java 1.8+
- Install Maven 3.x.x
- Create system variable JAVA_HOME with the path of your java installation
- Create system variable MAVEN_HOME with the path of your maven installation
- Add JAVA_HOME/bin and MAVEN_HOME/bin to PATH system variable
How to install Maven on Windows
cd todo-api
mvn clean install
cd todo-api
java -jar target/todo-api-0.0.1-SNAPSHOT.jar
- Build docker image with maven
cd todo-api
mvn package docker:build
- List of docker images
docker images
- Run your docker image
docker run -p 8080:8080 -t kupring/todo-api
curl -X GET 'http://localhost:8080/health'
------HTTP 1.1 200 OK------
{
"status": "UP"
}
When app started data will reset.