---
title: "Heroku"
description: "62 posts about Heroku, summarised, each linking to the original."
---

# Heroku
> 62 posts about Heroku, summarised, each linking to the original.

## Articles

### [Deploying a Simple Go/Gin Application on Heroku](https://yomu.fyi/post/deploying-a-simple-go-gin-application-on-heroku.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Ken W. Alger
- Published: May 22, 2025
- Type: Tutorial

Deploying a Go/Gin application can be simple locally but requires explicit preparation for cloud deployment, including dependency management, environment configuration, and a process definition. The guide initializes a Go module, adds Gin with go get, runs main.go locally, and verifies the API with curl, using Go 1.24.0 in its example. It then creates a Heroku app, adds a Procfile with web: go run main.go, runs go mod tidy, commits the project, and pushes the main branch to the Heroku remote. Heroku detects the Go app through go.mod, installs Go 1.24.0 and dependencies, builds ./bin/go-gin, and launches the web process; the deployed /quote endpoint returns JSON, while heroku logs --tail confirms a successful request.


### [SignalR Scalability: Scaling Real-Time SignalR Applications on Heroku](https://yomu.fyi/post/signalr-scalability-scaling-real-time-signalr-applications-on-heroku.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Andrew Fawcett
- Published: May 21, 2025
- Type: Tutorial

Scaling a SignalR application beyond one server requires coordination because each server maintains its own connected-client list. The guide builds a .NET 9.0 chat application, adds the Microsoft.AspNetCore.SignalR.StackExchangeRedis package, and configures Redis as a backplane with a SignalRChat channel prefix and environment-specific connection settings. It deploys the application to Heroku, changes the dyno type to standard-1x, and runs three web dynos; without session affinity, WebSocket startup fails because the connection may be routed to a different dyno. Enabling Heroku’s http-session-affinity feature keeps requests on one dyno, after which both browsers establish stable WebSocket connections and exchange chat messages successfully across the scaled deployment.


### [How I Improved My Productivity with Cursor and the Heroku MCP Server](https://yomu.fyi/post/how-i-improved-my-productivity-with-cursor-and-the-heroku-mcp-server.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Julián Duque
- Published: May 5, 2025
- Type: Tutorial

Cursor is presented as the author’s primary AI coding companion, with inline suggestions, quick edits, and agentic features supporting coding, testing, design, and deployment from one editor. Connecting it to Heroku through the Model Context Protocol (MCP) enables an assistant to deploy apps, scale dynos, fetch logs, and update configuration without opening the Heroku dashboard or terminal. The article explains MCP’s host–client–server model and gives Cursor setup configurations for the Heroku MCP Server, LangChain MCPDoc, and Figma MCP Server, including required Heroku authorization and tool commands. It reports that this workflow reduced context-switching, saved minutes on tasks, reduced errors from recalling commands, and helped the author stay focused while building and deploying demos.


### [How to Add the Moesif API Observability Add-On to Your Heroku Applications](https://yomu.fyi/post/how-to-add-the-moesif-api-observability-add-on-to-your-heroku-applicat.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Matt Tanner
- Published: Apr 16, 2025
- Type: Tutorial

Heroku applications can add the Moesif API Observability add-on to analyze API traffic and support monetization. The setup uses either the Heroku CLI or Dashboard: the CLI command is heroku addons:create moesif, while the UI path goes through Resources, Find more add-ons, and Metrics and Analytics. Provisioning creates a MOESIF\_APPLICATION\_ID config variable, and the application then requires the Moesif SDK initialized with that value. The guide also covers copying the variable into a local .env file with Heroku Local and excluding that file from Git through .gitignore. Once configured, API events should flow into Moesif for live logs, time-series metrics, funnels, retention, alerting, and billing features, while Heroku handles add-on billing and user management.


### [Using GitHub Actions with Heroku Flow for additional Security Control](https://yomu.fyi/post/using-github-actions-with-heroku-flow-for-additional-security-control.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Andrew Fawcett
- Published: Mar 27, 2025
- Type: Tutorial

The pattern combines GitHub Actions with Heroku Flow for private repositories and stricter security requirements when GitHub organization IP restrictions cannot use Heroku IP ranges. A custom self-hosted GitHub Runner runs as a Docker image on Heroku, while the Platform API and Source Endpoint API upload source code to ephemeral storage, build and deploy apps, and manage Review Apps. Event-specific workflows handle pushes, manual runs, schedules, and pull requests; a weekly workflow rebuilds and autodeploys the runner image within GitHub’s 30-day update window. Setup uses a Heroku Private Space, its outbound IPs, a GitHub access token, and organization name, but omits the repository URL in the Review App UI, does not run conventional Heroku CI tests, and is incompatible with Fir.


### [Simplifying JVM App Development with Heroku’s Buildpack Magic](https://yomu.fyi/post/simplifying-jvm-app-development-with-heroku-s-buildpack-magic.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Andrew Fawcett
- Published: Mar 24, 2025
- Type: Explainer

Heroku’s Java buildpacks simplify JVM application deployment by detecting project languages and frameworks, fetching build tools, and configuring runtime settings automatically. They support Spring Boot, Quarkus, and Micronaut by inspecting Maven or Gradle build definitions, packaging applications, selecting framework-specific runner commands, and mapping service variables such as SPRING\_DATASOURCE\_URL, SPRING\_REDIS\_URL, DATABASE\_URL, and JDBC\_DATABASE\_URL. In many cases, a Procfile is unnecessary because the buildpack can identify the executable JAR and provide a default web process, while Quarkus and Micronaut receive their respective runner JAR and port settings. Heroku also automatically attaches a lightweight JVM agent for runtime metrics, including memory usage and garbage collection, and offers similar buildpack support for Scala and Clojure through sbt and Leiningen.


### [Heroku CLI v10: Support for Next Generation Heroku Platform](https://yomu.fyi/post/heroku-cli-v10-support-for-next-generation-heroku-platform.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Anush DSouza
- Published: Dec 17, 2024
- Type: Announcement

Heroku CLI v10.0.0 updates the command-line tool for the next-generation Fir platform while introducing breaking changes and a Node.js 20 runtime. Fir users must replace several legacy command forms, including logs and ps:stop/ps:restart arguments, and use heroku run:inside because heroku run, ps:exec, ps:copy, ps:forward, and ps:socks do not work with Fir apps. New Fir support includes heroku telemetry commands for OpenTelemetry, a generation selector for spaces:create, generation details in space commands, Fir-aware pipeline and buildpack output, and real-time log streaming with --tail. The release also upgrades oclif to v4.14.36, updates GitHub workflows to Node 20, fixes log color rendering, and is available through heroku update.


### [Tips & Tricks for Migrating to Router 2.0](https://yomu.fyi/post/tips-tricks-for-migrating-to-router-2-0.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Agne
- Published: Nov 21, 2024
- Type: Tutorial

Heroku Router 2.0 is generally available and is expected to become the default, making migration planning important before rollout. The guidance recommends creating a staging application, enabling the http-routing-2-dot-0 feature, restarting web dynos when needed, and checking response headers and system logs to confirm routing. Router 2.0 identifies requests with Via values such as “2.0 heroku-router” or “1.1 heroku-router,” and its logs add protocol, tls, and tls\_version fields. HTTP/2 is enabled by default on custom domains with valid TLS certificates, while HTTP/2 can be disabled through a Labs feature. Keepalives are also enabled between the router and web dynos, but applications using recent Puma versions may need the keepalive opt-out because of a connection-handling bug.


### [How to Create an AI Agent With Heroku and Agentforce](https://yomu.fyi/post/how-to-create-an-ai-agent-with-heroku-and-agentforce.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Andrew Fawcett
- Published: Oct 17, 2024
- Type: Tutorial

The post shows how to extend Salesforce Agentforce with a Heroku-hosted custom action when customer information remains in older, unstructured cloud archives and requires scalable, real-time processing. It explains that Agentforce selects discrete actions, while Heroku exposes code through External Services using an OpenAPI description of the request and response. The sample uses Java and Spring Boot, an H2 in-memory database, springdoc.org for OpenAPI generation, and Spring AI to convert natural-language questions into SQL before returning results for an Agentforce response. The integration is identified as pilot-only and not intended for production, while the post also points to Heroku Postgres, Heroku Connect, Data Cloud, and pgvector as extensions for other agent use cases.


### [Testing a React App in Chrome with Heroku CI](https://yomu.fyi/post/testing-a-react-app-in-chrome-with-heroku-ci.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Julián Duque
- Published: Sep 24, 2024
- Type: Tutorial

The article presents a walkthrough for automating end-to-end browser tests for a React application in Heroku CI rather than relying on manual local testing. The sample app uses Jest and Puppeteer to check navigation to Puppeteer Documentation, retention of text entered into a form, and the greeting shown after submission, with headless Chrome supplied by the Chrome for Testing Heroku Buildpack. Local execution initially exposes a mismatch between the expected and received greeting, then passes after the application is fixed; a streamlined command starts the server and runs the suite. Heroku CI is configured with an app.json file containing Chrome for Testing and Node.js buildpacks, plus a test script that runs start-server-and-test and the Jest/Puppeteer tests. Pushes to the connected GitHub repository trigger the suite.


### [Building an Event-Driven Architecture with Managed Data Services](https://yomu.fyi/post/building-an-event-driven-architecture-with-managed-data-services.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Jonathan Brown
- Published: Aug 15, 2024
- Type: Explainer

Event-driven architecture (EDA) addresses the need to process and respond to continuous streams of real-time activity from applications, e-commerce systems, wearables, and other IoT sensors. Using Apache Kafka, independent producers publish events to topics while consumers subscribe and trigger downstream processes, keeping services decoupled and independently scalable. Kafka also distributes large data streams in real time and replicates data across synchronized broker nodes, so a node failure does not lose data or interrupt operation. Apache Kafka on Heroku is presented as a fully managed service, with multi-tenant basic and single-tenant private plans, automatic broker scaling, and Standard-tier-and-above configurations starting with three brokers and extending to eight. Recommended integration practices include mapping producer-consumer flows, using transactions, topic and schema management, and delivery guarantees, plus monitoring performance and logging Kafka operations.


### [Mastering API Gateway Integration: Salesforce, Heroku, and MuleSoft Anypoint Flex Gateway](https://yomu.fyi/post/mastering-api-gateway-integration-salesforce-heroku-and-mulesoft-anypo.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Julián Duque
- Published: Jul 29, 2024
- Type: Tutorial

MuleSoft Anypoint Flex Gateway provides a pattern for exposing APIs and microservices running in Heroku Private Spaces while adding API management and security controls. The tutorial deploys an internal Heroku application, creates or imports an OpenAPI 3.0 specification in Anypoint Design Center, publishes it to Exchange, registers the gateway through Runtime Manager, and deploys it in the same Private Space. That placement lets internal-routing applications receive public traffic through the gateway while routing access through a centrally configured layer managed with MuleSoft and Heroku. It then applies a Client ID Enforcement policy in API Manager, showing that requests with incorrect credentials fail and requests using the issued Client ID and Client Secret can authenticate. The pattern is presented as a foundation for Heroku and Salesforce multi-cloud integrations.


### [Heroku CLI v9: Infrastructure Upgrades and oclif Transition](https://yomu.fyi/post/heroku-cli-v9-infrastructure-upgrades-and-oclif-transition.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Anush DSouza
- Published: Jul 25, 2024
- Type: Announcement

Heroku CLI 9.0.0 is an architectural upgrade centered on moving all core commands from a partly legacy structure to oclif. Core commands are consolidated into one package, while improved unit and integration coverage, telemetry, and a simpler automated release process support contribution, maintenance, and pre-release testing. The oclif migration provides a modular command architecture with plugin support and is intended to make command behavior more consistent, maintenance easier, and provide better scalability. Users should expect breaking changes including altered whitespace, newlines, table formatting, colors, argument ordering, flag removals, and a required separator for additional flags; deprecated commands including outbound-rules, pg:repoint, orgs:default, certs:chain, certs:key were removed. Changes apply to core commands, not separately installed plugins, and the release can be installed with heroku update.


### [How to Use pnpm on Heroku](https://yomu.fyi/post/how-to-use-pnpm-on-heroku.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Colin Casey
- Published: Jul 19, 2024
- Type: Tutorial

Heroku’s Node.js buildpack supports pnpm, a fast, disk-efficient alternative to npm, and early users reported 10–40% faster install times on Heroku deployments. pnpm uses a content-addressable store and symlinks to avoid duplicate packages, accelerates dependency installation by combining resolve, fetch, and linking, and enforces dependency boundaries. The tutorial uses Node.js v18 or higher and Corepack to initialize and pin pnpm 9, then creates an Express application whose pnpm-lock.yaml enables buildpack support and consistent package resolution. The demo server handles HTTP GET requests with “Hello pnpm!” and listens on process.env.PORT or defaults to 3000. It finishes by adding a Procfile, committing the project to Git, creating a Heroku app, and deploying with git push heroku main.


### [Build Well-Documented and Authenticated APIs in Node.js with Fastify](https://yomu.fyi/post/build-well-documented-and-authenticated-apis-in-node-js-with-fastify.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Julián Duque
- Published: Apr 29, 2024
- Type: Tutorial

This walkthrough builds and deploys a Node.js API with Fastify, covering a public directory endpoint and a JWT-protected profile endpoint backed by Heroku Postgres. It uses Fastify’s plugin architecture, including a custom database plugin that reads DATABASE\_URL, creates a PostgreSQL pool, and decorates the server with db.query; @fastify/autoload registers plugins from the plugins directory. Authentication uses a JWT signed with an RSA256 private key, while the public key validates requests, and Fastify Swagger plugins generate an OpenAPI specification and UI that Postman can import as an API client. After local testing, the project seeds 50 database records, configures the RSA public key, and deploys through Heroku CLI commands, where the /directory endpoint returns usernames and the deployed API is shown running.


### [Improved Browser Testing on Heroku with Chrome](https://yomu.fyi/post/improved-browser-testing-on-heroku-with-chrome.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Mars Hall
- Published: Apr 9, 2024
- Type: Announcement

Automated browser tests on Heroku can fail when installed Chrome and Chromedriver versions drift apart, producing a mismatch error that stops the suite. The post introduces the community Chrome for Testing Heroku Buildpack, created to address installation reliability as Chrome continuously receives updates rather than pinning a browser version that quickly becomes outdated. Apps should remove existing Chrome and Chromedriver buildpacks and add heroku-community/chrome-for-testing as the first buildpack. By default it downloads Google's latest Stable release, while GOOGLE\_CHROME\_CHANNEL can select Stable, Beta, Dev, or Canary. After deployment, chrome and chromedriver are placed on the dyno PATH for tools including Selenium WebDriver and Puppeteer, providing executables for browser automation.


### [Building a GPT Backed by a Heroku-Deployed API](https://yomu.fyi/post/building-a-gpt-backed-by-a-heroku-deployed-api.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Julián Duque
- Published: Mar 28, 2024
- Type: Tutorial

The walkthrough shows how to connect an OpenAI custom GPT to a Node.js backend that provides natural-language access to an employee directory. It builds an Express API with a POST /search endpoint, where OpenAI’s Chat Completions API converts a user’s question into a single SQL query, the database returns rows, and a second OpenAI call turns those rows into a natural-language response. The project uses Heroku Postgres, environment configuration, bearer-key authentication, Swagger UI, and an OpenAPI specification imported into the GPT action. The deployment flow covers seeding dummy records, deploying from a GitHub-connected repository, and configuring the action to call the hosted API, while noting that data leaves Heroku’s trust boundary for OpenAI services.


### [Working with ChatGPT Functions on Heroku](https://yomu.fyi/post/working-with-chatgpt-functions-on-heroku.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Julián Duque
- Published: Jan 30, 2024
- Type: Tutorial

Menu Maker is a Node.js web application that turns user-supplied ingredients into a dish name, fine-dining description, ingredient list, and recipe. Its React front end communicates with an Express back end, which adds prompt instructions and sends the request to OpenAI’s Chat Completions API. The application uses ChatGPT’s function calling feature to define an updateDish function with structured JSON fields for the title, description, ingredients, and recipe, so parsed arguments can update React state directly. The GitHub-hosted Node.js monorepo is deployed to Heroku, where an OPENAI\_API\_KEY config var authenticates requests, an optional CHATGPT\_MODEL selects the model, and Heroku runs yarn build and yarn start.


### [How to Use pgvector for Similarity Search on Heroku Postgres](https://yomu.fyi/post/how-to-use-pgvector-for-similarity-search-on-heroku-postgres.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Valerie Woolard
- Published: Nov 16, 2023
- Type: Tutorial

Heroku Postgres now supports pgvector on all Standard-tier or higher databases running Postgres 15, adding vector storage and functions for similarity search and machine-learning applications. Older Postgres versions require an upgrade to Postgres 15. The workflow generates embeddings, adds a VECTOR(100) column, and stores values using SQL or Python with psycopg, pgvector-python, and Wikipedia2Vec’s pretrained 100-dimensional model. Queries can rank vectors with Euclidean, cosine, or inner-product distance; the example uses <-> to return five animals nearest to shark, producing crocodile, dolphin, whale, turtle, and alligator. Results depend on the embedding model and corpus, while indexes introduce approximate nearest-neighbor search; pgvector supports IVFFlat and HNSW, with IVFFlat requiring table data for better recall.


### [Turbocharge your Heroku Apps with New Turboku](https://yomu.fyi/post/turbocharge-your-heroku-apps-with-new-turboku.md)
- Company: [Fly.io](https://yomu.fyi/company/fly-io.md)
- Published: Feb 8, 2022
- Type: Announcement

New Turboku clones a Heroku app on Fly.io without requiring data migration, while the resulting app should be able to use services such as Heroku Postgres or Redis through transferred environment variables. The rebuilt workflow integrates flyctl with Fly.io’s remote builders instead of AWS CodeBuild: it queries Heroku, selects a region, converts config variables to secrets, and generates fly.toml, an ephemeral Dockerfile, and a reconstituted Procfile from the slug and process map. A Phoenix LiveView web launcher wraps the deployment by starting a Fly.io Machine running flyctl, while the CLI is available through flyctl turboku. The launcher also configures webhooks and watches environment-variable changes for automatic updates, whereas the CLI lacks webhook integration; the source reports about one millisecond of added database latency for a US-based app.


[Newer posts](https://yomu.fyi/topic/heroku.md) · [Older posts](https://yomu.fyi/topic/heroku/page/3.md)
