Skip to content
← Back to YouBlog

Published article

How Do You Deploy a Node API to Heroku Today?

To deploy a Node API to Heroku, push a repository the platform can build, declare how it starts, and set every secret as a config var. A 2020 walkthrough by Gustavo Dev Doido shows the config steps on a Node API, though the free dyno it used was retired in 2022.

Why a 2020 Heroku Deploy Video No Longer Matches Heroku

A 2020 Heroku deploy walkthrough still describes the right commands for a Node API, but the platform's free tier it depended on was shut down, so present-day readers must budget for a paid dyno. The video by Gustavo Dev Doido, a Brazilian developer channel, recorded a tutorial titled "#2 - Deploy no Heroku com Serjão Berranteiro" and published it on 24 May 2020.

That video opens with a mock persona imitating Serjão Berranteiro, a long-running Brazilian internet meme whose catchphrase and audio clips circulated from Orkut on through TikTok. The joke framework matters for understanding the recording: it is a casual 2020 tutorial, not a reference architecture.

Heroku, a platform-as-a-service owned by Salesforce, has since changed its commercial terms. The free dyno product was discontinued, and the platform's current pricing is published on its own site. Anyone following old tutorials needs to check that page before assuming the commands will run without a payment method on file.

Deploy a Node API to Heroku in Four Steps

To deploy a Node API to Heroku today you install the CLI, authenticate, create an app, connect or push a Git repository, and set every secret as a config var. The build happens on Heroku's servers from the code you push.

The 2020 video compressed this into an improvised sequence with a handful of commands typed over a live terminal. The transcript is noisy, but the order of operations is recognizable.

  1. Install the Heroku CLI and log in with heroku login, which opens a browser session instead of asking for the password in the terminal.
  2. Create the app with heroku create <app-name> or attach an existing Git repository with heroku git:remote -a <app-name>.
  3. Push the code with git push heroku main (the video used master, the default branch name at the time).
  4. Set configuration by running heroku config:set KEY=value for each variable your API reads at startup.

Two of those steps deserve a closer look for Node specifically. Heroku assigns the listening port at runtime through the PORT environment variable, so an Express server must read process.env.PORT rather than hard-coding 3000. And the platform chooses how to start the app from a Procfile or the start script in package.json.

How Config Vars Handle Secrets Like a Payment Key

Config vars on Heroku are environment variables stored outside the repository, and the 2020 video used them to hold a database connection string and a payment gateway key rather than committing those values to Git.

The video's demonstration is a reasonable illustration of the split between code and credentials. It sets a database URL variable and a production key for Pagar.me, a Brazilian payment gateway, then tests the API from Insomnia, an HTTP client, against the deployed URL.

The transcript garbles the exact command, but the shape is heroku config:set NAME=value. A few practical points follow from that.

  • Values containing = or special characters should be quoted so the shell does not split them.
  • Changing a config var restarts the app, so a batch of new secrets is faster with heroku config:set KEY1=a KEY2=b.
  • To audit what is currently set, heroku config prints the names and values, which is also a reason to avoid running it on a shared screen.
  • Anything read from a local .env file during development must be added explicitly, because Heroku does not upload that file.

What Changed With Free Dynos and the Platform's Terms

Heroku's free dyno plan no longer exists. Heroku announced in 2022 that free product plans would be discontinued, and the free dynos and free Postgres tier stopped being available from 28 November 2022.

That date turns old tutorials into historical documents. The 2020 recording could assume an app would run without a billing relationship; a reader in 2026 cannot. Current plan names, prices, and included hours live on Heroku's pricing page, and those numbers change, so check them there rather than trusting a blog post.

The mechanics of Git-based deploys, buildpacks, config vars, and release logs are still the same family of features. What changed is the commercial gate in front of them.

When Heroku Is the Wrong Host for Your API

Heroku suits a small Node API that needs a URL, a build pipeline, and a small PostgreSQL database without an infrastructure team, but it is a paid choice now and competing platforms price differently.

The alternatives worth knowing in 2026 range from container platforms to plain virtual machines. Each one shifts a different part of the work back to you.

OptionModelWhat you manageBest fit
HerokuManaged PaaS, paid plansApp code and config varsSmall APIs, fastest start
RenderManaged PaaS, free tier for web services with limitsApp code and config varsReplacing a former Heroku free app
Fly.ioContainer platformDockerfile, volumes, scalingApps needing regions and persistent disks
A generic VPSRaw serverOS, runtime, TLS, deploysTeams that want full control

Comparing prices across these options requires reading each vendor's own page, because included hours, sleep behavior, and database costs differ. A slow, low-traffic API can be cheap on several of them; the deciding factor is usually how much operational work you accept.

Reading the Podcast-Like Comedy in the Original Tutorial

The 2020 video is a comedy-flavored tutorial, and the Serjão Berranteiro persona it borrows is a Brazilian meme built from a recorded interview clip rather than a software product, so it should be read as entertainment framing around ordinary deploy steps.

Researchers at the Federal University of Goiás analyzed the meme in an academic thesis hosted by the university's digital repository, tracing its circulation from early social platforms to TikTok dubbing and parody videos. That work treats the character as a regional stereotype performed for comedy.

Other creators reused the audio too. Song catalogs on Suno, an AI music generation site, host user-made tracks built around the same quoted lines, and chord sites such as Cifra Club list guitar arrangements of one version. None of that changes the deploy instructions, but it explains the density of catchphrases in the transcript.

A Modern Equivalent of the Old Walkthrough

A current version of the same tutorial keeps the commands and adds the pieces 2020 hardware did not require: a payment method, a modern Node runtime, and a check that the app binds to the assigned port.

If you are building the API in TypeScript rather than plain JavaScript, the toolchain affects the build step. Crazystack TypeScript is a Brazilian starter kit that provisions a Node API project with TypeScript, documentation, and deployment guidance; its site at crazystack.com.br describes the included stack. Heroku can run such a project as long as the build script compiles TypeScript before the start command runs, and the heroku-postbuild script in package.json is the usual place for that.

A short migration checklist for anyone following an old tutorial:

  1. Confirm the Heroku account has a plan that will actually run a dyno.
  2. Rename the branch reference from master to main if the repository uses the newer default.
  3. Move every secret from .env into config vars by hand.
  4. Read the port from process.env.PORT.
  5. Watch heroku logs --tail on the first boot to catch a crash loop early.

FAQ

  • Can I still deploy to Heroku for free in 2026? No. Heroku announced that free product plans would be discontinued, and free dynos stopped running on 28 November 2022. You now need a paid plan, so check the current pricing page before starting a tutorial from 2020.
  • Why does my Node API crash right after a Heroku deploy? The usual causes are ignoring the assigned PORT, a missing start script or Procfile, or a config var that exists locally in .env but was never set on Heroku. Run heroku logs --tail to see which one it is.
  • Do config vars replace a .env file? Yes. Heroku does not read .env from your repository, so every variable your code needs must be set with heroku config:set or through the dashboard.
  • Should I use heroku create or heroku git:remote? Use heroku create to make a new app and add the remote automatically. Use heroku git:remote -a <app-name> when the app already exists and you only need to connect your repository.
  • What is the Serjão Berranteiro joke in the tutorial? It is a Brazilian meme character used as comic framing in the 2020 video by Gustavo Dev Doido, whose channel name appears in the app name and the deployed URL. It has no bearing on the deployment steps.
  • Does Heroku support TypeScript projects? Yes, as long as the build step compiles TypeScript to JavaScript before the app starts. Add a heroku-postbuild script that runs the compiler, then point start at the compiled output.
  • What replaced the free Postgres plan? The free database tier ended alongside free dynos in 2022. Current database options and their prices are listed on Heroku's pricing page, and third-party providers such as Neon offer separate free tiers.
  • Can I move an existing app off Heroku? Yes. Because Heroku builds from your Git repository, the code usually runs unchanged on a container platform once config vars, the port binding, and the start command are replicated.
  • Is the old tutorial still worth reading? For the ordering of steps and the idea of keeping secrets in config vars, yes. For anything involving cost, free hours, or default branch names, it is out of date.

Turn the Explaining Into Something Written

A deploy tutorial works because somebody shows the order of operations and names the traps, which is the same thing a good written guide does. If you have already explained a setup like this on camera, the recording holds the knowledge but not the searchable text.

Skala Blog converts a YouTube video into a draft article by transcribing the audio and structuring it for readers, which suits technical explanations, interviews, and lessons that only exist as video right now. Paste a URL, get a draft, then edit it with the judgment you would apply to your own work.

Start at Skala Blog and bring one of your videos with you.

Source video

YouTube thumbnail: #2 - Deploy no Heroku com Serjão Berranteiro (NA ÉPOCA ERA DE GRAÇA)

Source video

#2 - Deploy no Heroku com Serjão Berranteiro (NA ÉPOCA ERA DE GRAÇA)

Create from this video

This article was created automatically from a new video.

Automate my channel

Turn your YouTube videos into articles

Built for creators with a backlog and no editor on staff. This page started as a video — YouBlog drafts from the transcript, you review every word, then publish on a first-party /p/{slug} page. Nothing goes live until you publish it.

Turn your videos into articles

Published with YouBlog