Abhimanyu Chitra Selvan



I built a NEWS app to explore DigitalOcean's App Platform

Photo by Obi - @pixel6propix on Unsplash

I built a NEWS app to explore DigitalOcean's App Platform

Code to Production in minutes, really?

Abhimanyu Chitra Selvan's photo
Abhimanyu Chitra Selvan
·Jul 6, 2022·

4 min read

Play this article

Table of contents

  • Am I a programmer or an assembler?
  • Cloud Native Buildpacks (CNBs) vs Dockerfile
  • Code is ready, now what?
  • Takeaway

Hello folks, long time no see. I would not say that I did not have the time to write an article. I would rather go ahead and state the obvious, "I did not know what to write about". Now that you have appreciated and applauded my honesty, you can go ahead and read about something cool that I came across recently.

DigitalOcean has been in recent times our favourite cloud provider to run our PaaS solution. We integrated our solution into the DigitalOcean marketplace as a 1-click-kubernetes-app. In this blog, I won't be raving about how simple and cost-effective DigitalOcean is but I'll be exploring one of their popular offerings called the App Platform.

Get apps to market faster: We’ll handle the infrastructure, app runtimes and dependencies so that you can push code to production in just a few clicks. - App Platform

A lot of buzz around "code to production in a few clicks" these days. Since I have had a smooth experience so far with DO's offerings, I was curious to see how this would turn out.

Am I a programmer or an assembler?

I enjoy programming. Do I program these days? NO. Well, before the coders of the world jump to conclusions let me clarify it for you.

package main
import "fmt"
func main() {
    msg := "My job does not entail me to code full time. \n" +
        "I build POCs from time to time to demonstrate a product feature.\n"

To explore the App Platform, I decided to build a simple news-app that allows the user to search for a topic and serves news from across the globe. The app uses News API under the hood. Now I need to "containerise" it right?

DigitalOcean's App Platform supports both CNBs and Dockerfile to build and create container images.

Cloud Native Buildpacks (CNBs) vs Dockerfile

I have not used CNBs before building this application. I have heard about them but never used them. I did not have the need. Remember? when I said

I approach everything on a need basis, especially technology - Abhi

I was happy and comfortable writing Dockerfiles. The digital world as we know it today is a "developer-first" world. Making it easier for devs to purely focus on coding and leave all the heavy-lifting to other service providers. The "I might as well try something new brain" in me decided to opt for the Buildpack approach. If it can remove the need to write and maintain another file in the repo, why not? for I am also a developer right? ;)

If you are curious about the differences between CNBs and Dockerfile, you can check this article by Tanzu.

Transform your application source code into images that can run on any cloud - Cloud Native Buildpacks

Code is ready, now what?

I have written code and like any sane engineer, I tested it locally using Paketo Buildpack for Go to make sure that I have everything I need for the App platform to do its magic.

I kid you not, I had the application built and deployed with a live app URL in a few clicks.

Screenshot 2022-07-06 at 16.42.48.png

Screenshot 2022-07-06 at 16.43.27.png

Screenshot 2022-07-06 at 16.43.57.png

I had to point to my GitHub repo, set some environment variables needed for the app and that's it. DigitalOcean also configures and generates a live app URL. Since I had a domain at my disposal, I configured the news app to my domain.

So here is the entire flow,

1. Push code to GitHub (user action, that's it!)
2. App Platform scans the repo, builds and deploys the app
3. Users can enjoy the latest and greatest news app


I am happy that cloud-native development is becoming streamlined and simpler with fully managed platforms such as App Platform. This will surely encourage more developers, hobbyists and businesses to focus on building feature sets, rather than worrying about infrastructure etc. Having said that, Is the App platform enough to run your fully blown full-stack application? I will find out as I am planning to dig deeper or let's say "deep-dive" into DigitalOcean ;)

Did you find this article valuable?

Support Abhimanyu Chitra Selvan by becoming a sponsor. Any amount is appreciated!

Learn more about Hashnode Sponsors
Share this