// Articles

Guides and deep dives

Guides, tutorials, and comparisons to help you build better backend applications.

Filter by category: How-To (8)
How to Write Go Integration Tests Against PostgreSQL

Testing Go database code against a real Postgres instead of mocks: Testcontainers, template databases with pgtestdb, a shared Compose database, and encore test with a fully migrated database per test.

6 Min Read
How to Run PostgreSQL Locally for Development

Four ways to get a local Postgres for your app: started automatically by Encore, Docker Compose, Homebrew or Postgres.app, and Testcontainers, with the PostgreSQL 18 Docker volume change that loses data if you miss it.

5 Min Read
How to Handle GitHub Webhooks in a TypeScript API

Verifying X-Hub-Signature-256 over the raw body, answering within GitHub's 10-second limit, deduplicating redeliveries by X-GitHub-Delivery and doing the work from a queue, with tested code that deploys to your own AWS or GCP account.

6 Min Read
How to Handle Stripe Webhooks in a Go API

Verifying the Stripe-Signature header with stripe-go, avoiding the API version mismatch error, acknowledging fast and deduplicating retries, with tested code that deploys to your own AWS or GCP account.

6 Min Read
How to Connect ECS Fargate to ElastiCache Redis

Reaching an ElastiCache Redis or Valkey cache from Fargate tasks: subnets and security groups, TLS and AUTH, cluster mode clients, and a cache declared in code that Encore provisions in your own AWS account.

6 Min Read
How to Use AWS Secrets Manager With ECS Fargate

Injecting Secrets Manager values into Fargate tasks through the task definition, the execution role permissions it needs, why rotated values do not reach running tasks, and when to read secrets at runtime instead.

6 Min Read
How to Connect to a Private RDS Database From Your Laptop

Four ways to reach an RDS PostgreSQL instance in private subnets from your machine: SSM port forwarding, a bastion with an SSH tunnel, AWS Client VPN, and an access proxy that comes with the database.

5 Min Read
How to Connect ECS Fargate to RDS PostgreSQL

The three ways to connect an ECS Fargate service to an RDS Postgres database: security groups with Secrets Manager, RDS Proxy, and IAM database authentication. Plus the setup where the database and its wiring come from your code.

6 Min Read