diff --git a/README.md b/README.md index 7b242b7..0305f3c 100644 --- a/README.md +++ b/README.md @@ -1 +1,29 @@ -# jheroku-keep-alive \ No newline at end of file +# JHeroku-keep-alive +This minimalistic java library brings a powerful annotation to your Java Spring Boot application and prevents your app from sleeping on the free Heroku plan! + +## Where do I get this library +To use this library in your Web Application use it from our GitHub packages: +https://github.com/orgs/PickwickSoft/packages + +## Usage +JHeroku-keep-alive provides the following annotation `@HerokuKeepAlive` + +Use this annotation like that: + +```java +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.pickwicksoft.jherokukeepalive.HerokuKeepAlive; + +@HerokuKeepAlive +@SpringBootApplication +public class WebApp { + + public static void main(String[] args) { + SpringApplication.run(WebApp.class, args); + } +} +``` + +## How does it work? +The annotation adds a spring service to your application that starts a GET request to [https//:localhost:8080](https//:localhost:8080) every five minutes wich prevents the Heroku machine from shutting down. \ No newline at end of file diff --git a/pom.xml b/pom.xml index 3489dde..6310efd 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ org.pickwicksoft jheroku-keep-alive - 0.0.1 + 1.0.0 jheroku-keep-alive An annotation for spring boot to prevent your app running on heroku from hibernating jar