Skip to content

egebozdemir/Habit-Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Habit-Tracker

Spring Boot Framework Demo Project

appRunOnDockerImageCreatedWithinGithubAction_HabitTracker

Basic REST application in Java - Spring Boot which generates the HTTP request that performs CRUD operations on the JSON data. Dockerized and published within github workflow

🏃 How to Run:

 docker pull ghcr.io/egebozdemir/habit-tracker:main
 docker run -p 8080:8080 ghcr.io/egebozdemir/habit-tracker:main



▶️ Example Habit Request (creating a new habit):

 curl -H "Content-Type: application/json" -X POST http://localhost:8080/habits -d "{\"name\": \"make the bed\"}"
 curl -H "Content-Type: application/json" -X POST http://localhost:8080/habits -d "{\"name\": \"walk the dog\"}"
 curl -H "Content-Type: application/json" -X POST http://localhost:8080/habits -d "{\"name\": \"brush teeth\"}"



▶️ Example Activity Requests (creating an activity related to a habit):

 curl -H "Content-Type: application/json" -X POST http://localhost:8080/activities -d "{\"habitId\": \"1\"}"
 curl -H "Content-Type: application/json" -X POST http://localhost:8080/activities -d "{\"habitId\": \"2\"}"



💡 To Check created DB Records (H2 in-memory db)

Go to "localhost:8080/h2-console" in your browser after the application stands up
Credentials are in "/src/main/resources/application.properties"

About

Spring Boot Framework Demo Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages