Skip to content

gooooogolf/todo-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Todo-API

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.

API Document

Example API Document

Postman Collection

How do I get set up?

  • 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

To build use this command

cd todo-api
mvn clean install

To run use this command

cd todo-api
java -jar target/todo-api-0.0.1-SNAPSHOT.jar

To build and run with docker

  1. Build docker image with maven
cd todo-api
mvn package docker:build
  1. List of docker images
docker images
  1. Run your docker image
docker run -p 8080:8080 -t kupring/todo-api

To check health status use this command

curl -X GET 'http://localhost:8080/health'

------HTTP 1.1 200 OK------
{
  "status": "UP"
}

Note

When app started data will reset.