Loading...
Home
  • Tech Blogs
  • Videos
  • Conferences
    • Droidcon News
    • Upcoming Conferences
    • Become a Partner
    • Past Events
    • Keep Me Informed
    • Diversity Scholarships
  • Community
    • droidcon Team
    • How to Hold a Droidcon
  • Android Careers
Sign In

Global CSS

 

How to create a REST API for your App with Spring Boot, Kotlin & Gradle (Part 5: Deploy on Heroku)

 

 
Cristian Villaseca
Software Engineer at Turo
Published: July 15, 2020
Tweet
Share
 
 

 

Heroku is a cloud platform as a service that supports Kotlin. It has a free plan that will allow us to start working on integrating our clients with our API and is very easy to configure. I’m going to use a Github Action to make automatic deploys every time something is pushed to master. After you have created an account, we can follow with the next steps:

 

1. Create an authorization

In order to do this we need to create an API key to authorize Github to start the deploy.

 

 

Image for post
 

2. Configure a deploy Github Action

I have found this action to work really well as it is very easy to configure. If your project is public, I recommend using Github Secrets to keep your private info out of the yml file.

 

 

3. Test your deployment is working

The GitHub Action above will deploy to Heroku once you push to master. There are two ways to follow the deploy progress:

  • Checking the action progress on Github

 

 

Image for post

 

  • Checking the Heroku dashboard

 

 

Image for post
 


At this point, you have REST API for your App with Spring Boot, Kotlin & Gradle. Your API is ready to start growing with your specific requirements, API calls and controller logic. The most important of all is that this setup enables a backend at zero cost and using latest technologies, which is perfect as an initial starting point for your pet projects.

This article is part of a series of tutorials:
- Part 1. First Controller
- Part 2. Securing with OAuth2
- Part 3. Adding a H2 database
- Part 4. Testing the API
- Part 5. Deploy on Heroku

The entire code is available on Github:

 

cvillaseca/mobileAPI

REST API with Oauth2 using Springboot 2.2.X written in Kotlin - cvillaseca/mobileAPI

github.com

 

Remember to follow, share & hit the 👏 button if you liked it! :)

GitHub | LinkedIn | Twitter

 

Thanks to Mario Sanoguera de Lorenzo. 

 

 

Tags: Spring Boot, Kotlin, Gradle, Rest Api, Heroku

 

View original article at: 


 

Originally published: June 19, 2020

Android News
Evolution of Android Update SystemEvolution of Android Update System
Evolution of Android Update SystemEvolution of Android Update System

By Ivan Kuten

So, how can you update Android on mobile devices? While developing software for Smart TVs and Android-based set-top boxes, we’ve narrowed it down to four ways, discarding some very exotic options:

By ProAndroidDev -
Android News
Happy Railway
Happy Railway

By Hadi Lashkari Ghouchani

This post is on the tail of Railway Oriented Programming in Kotlin by Antony Harfield. So you need to read it first and continue here. As it’s obvious I really liked it and tried it out. It needs every process have a result like

By ProAndroidDev -
Android News
Unit Tests and Concurrency
Unit Tests and Concurrency

By Stojan Anastasov

Once Retrofit added RxJava support, RxJava became my go-to concurrency framework for writing Android apps. One of the great things about RxJava is the excellent testing support. It includes TestObserver, TestScheduler, RxJavaPlugins so you can switch your schedulers in tests.

By ProAndroidDev -
Android News
When Compat libraries will not save you
When Compat libraries will not save you

By Danny Preussler

And why you should avoid using the “NewApi” suppression! The idea of “Compat” libraries was probably one of the key aspects of Android dominating the mobile space. Other than with iOS, Android users often could not update their operating system after a new version launch, simply as their phones won’t allow them to, the Android problem of fragmentation.

 

By ProAndroidDev -
droidcon News

Tech Showcases,

Developer Resources &

Partners

/portal/rest/jcr/repository/collaboration/Groups/spaces/droidcon_hq/Documents/public/home-details/EmployerBrandingHeader
EmployerBrandingHeader
https://jobs.droidcon.com/
/portal/rest/jcr/repository/collaboration/Groups/spaces/droidcon_hq/Documents/public/employerbranding/jobs-droidcon/jobs.droidcon.com
jobs.droidcon.com

Latest Android Jobs

http://www.kotlinweekly.net/
/portal/rest/jcr/repository/collaboration/Groups/spaces/droidcon_hq/Documents/public/employerbranding/kotlin-weekly/Kotlin Weekly
Kotlin Weekly

Your weekly dose of Kotlin

https://proandroiddev.com/
/portal/rest/jcr/repository/collaboration/Groups/spaces/droidcon_hq/Documents/public/employerbranding/pad/ProAndroidDev
ProAndroidDev

Android Tech Blogs, Case Studies and Step-by-Step Coding

/detail?content-id=/repository/collaboration/Groups/spaces/droidcon_hq/Documents/public/employerbranding/Zalando/Zalando
/portal/rest/jcr/repository/collaboration/Groups/spaces/droidcon_hq/Documents/public/employerbranding/Zalando/Zalando
Zalando

Meet one of Berlin's top employers

/detail?content-id=/repository/collaboration/Groups/spaces/droidcon_hq/Documents/public/employerbranding/Academy for App Success/Academy for App Success
/portal/rest/jcr/repository/collaboration/Groups/spaces/droidcon_hq/Documents/public/employerbranding/Academy for App Success/Academy for App Success
Academy for App Success

Google Play resources tailored for the global droidcon community

Follow us

Team droidcon

Get in touch with us

Write us an Email

 

 

Quicklinks

> Code of Conduct

> Terms and Conditions

> How to hold a conference

> FAQs

> Imprint

Droidcon is a registered trademark of Mobile Seasons GmbH Copyright © 2020. All rights reserved.

powered by Breakpoint One