https://github.com/lennonjesus/javalin-kotlin-gradle-heroku
A simple project to demonstrates how to deploy a Kotlin + Javalin + Gradle application on Heroku
https://github.com/lennonjesus/javalin-kotlin-gradle-heroku
endpoint gradle heroku javalin kotlin rest sample serverless
Last synced: 5 months ago
JSON representation
A simple project to demonstrates how to deploy a Kotlin + Javalin + Gradle application on Heroku
- Host: GitHub
- URL: https://github.com/lennonjesus/javalin-kotlin-gradle-heroku
- Owner: lennonjesus
- Created: 2019-04-26T16:22:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-29T10:07:38.000Z (over 6 years ago)
- Last Synced: 2025-04-02T09:44:57.840Z (6 months ago)
- Topics: endpoint, gradle, heroku, javalin, kotlin, rest, sample, serverless
- Language: Kotlin
- Homepage: https://javalin-kotlin-gradle-heroku.herokuapp.com/
- Size: 61.5 KB
- Stars: 1
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# javalin-kotlin-gradle-heroku
### A simple project to demonstrates how to deploy a Kotlin + Javalin + Gradle application on Heroku
[](https://travis-ci.org/lennonjesus/javalin-kotlin-gradle-heroku)
[](https://codeclimate.com/github/lennonjesus/javalin-kotlin-gradle-heroku)### Requirements
You should have Git, Java, Gradle and Heroku-cli installed.### Clone this repo
```
$ git clone https://github.com/lennonjesus/javalin-kotlin-gradle-heroku.git && cd javalin-kotlin-gradle-heroku
```### Test on local machine
#### Run local tests (it will download dependencies, compile sources and run tests)
```
$ gradle clean test
```### Run on local machine
#### Start server (it will download dependencies, compile sources and start the server)
```
$ gradle run
```#### Open your favorite browser...
```
http://localhost:7000
```#### ...or use cURL on a terminal...
```
$ curl http://localhost:7000
```#### ...and you should get this response
```
Hello Javalin with Kotlin on Heroku!
```#### Stop the server
```
$ gradle --stop
```### Deploy and test on heroku
### Create new Heroku project
```
$ heroku create
```### Deploy to Heroku
```
$ git push heroku master
```### Scale up
```
$ heroku ps:scale web=1
```#### Open your favorite browser...
```
$ heroku open
```#### ...or use cURL on a terminal...
```
$ curl https://[HEROKU-PROJECT-NAME-GOES-HERE].herokuapp.com
```#### ...and you should get this response
```
Hello Javalin with Kotlin on Heroku!
```