Examples

Learn Loutrefrom working code

HTTP, CLI, Worker, Auth, and DatabaseExplore focused examples for each use case

Hello CLI

A CLI application that accepts arguments and runs a Task

Hello Worker

A Worker that repeatedly runs a Task with fixedDelay

Nested Contract Auth

Apply authentication at a parent Contract branch and inherit its Context

Basic Auth

Protect an API with HTTP Basic authentication

Bearer Auth

Validate bearer tokens to protect an API

CORS

Handle CORS and preflight requests in a Pipeline

Database Transactions

The fundamentals of using transactions

PostgreSQL

PostgreSQL transactions with pg

Drizzle + PostgreSQL

Transactions with Drizzle and PostgreSQL

Prisma + PostgreSQL

Use Prisma interactive transactions from a Pipeline