devlanes is in beta and not ready for production use.Report an issue

Examples you can clone and start.

Each one is a small app that shows a few devlanes features working. Its README walks through what happens when it starts.

examples
$ git clone https://github.com/devlanes-run/examples
$ cd examples/basics-hello-node
$ devlanes start

30 examples

Category

Built with

Teaches

Basics

Start here if devlanes is new to you.

  • Hello Node

    Start here: one TypeScript server that gets its port and HTTPS hostname from devlanes.

    • run_script
    • hosts
    • ready.http
    • tasks.when: lane.create
    • global_env
    • Hono
    • TypeScript
    needs node
  • Ready checks

    Tell devlanes when each service is up, with an http, tcp, log or cmd ready check.

    • ready.http
    • ready.tcp
    • ready.log
    • ready.cmd
    • ready.http.host
    • hosts.host_header
    • and 5 more
    • Hono
    • TypeScript
    needs node, curl

Languages

Services written in Python, Rust, Java and Go.

  • Python and FastAPI

    Run a FastAPI app under uv behind the HTTPS proxy, and call other HTTPS services from it.

    • run
    • run_script (pyproject.toml)
    • platform: python
    • tasks.when: lane.create
    • SSL_CERT_FILE
    • DEVLANES_ORIGINS
    • FastAPI
    • Python
    needs uv
  • Rust and axum

    Run the services of a Cargo workspace, with a ready timeout long enough for the first build.

    • run_script (Cargo.toml)
    • ready.http.timeout
    • SSL_CERT_FILE
    • devlanes lane new
    • Rust
    needs rust
  • Java with Maven and Spring Boot

    Run two Spring Boot apps from one Maven multi-module build, one calling the other over HTTPS with the devlanes CA trusted.

    • run_script (pom.xml)
    • preset: spring-boot
    • platform: java
    • hosts[].port
    • ready.http.timeout
    • services.<name>.public_url
    • Java
    needs java
  • Go and net/http

    Run two Go programs from one module, one with go run and one rebuilt by air, and call one from the other over HTTPS.

    • run_script (go.mod)
    • run_script (Taskfile.yml)
    • SSL_CERT_FILE
    • lane.data_path
    • ready.http.timeout
    • devlanes lane new
    • Go
    needs go, task

Web

Browser apps and the APIs they call, behind the HTTPS proxy.

  • Frontend and API on one lane domain

    Point a React frontend at its lane's API, with CORS and a session cookie that work on the lane's domain.

    • preset: vite
    • services.<name>.public_url
    • services.<name>.url
    • DEVLANES_ORIGINS
    • React
    • Vite
    • Hono
    • TypeScript
    needs node
  • Next.js app with an HTTPS sibling API

    Run Next.js with the next preset and call an HTTPS API in the same lane from a server component.

    • preset: next
    • NODE_EXTRA_CA_CERTS
    • services.<name>.public_url
    • services.<name>.url
    • tasks.when: lane.create
    • devlanes lane new
    • and 1 more
    • Next.js
    • React
    • Hono
    • TypeScript
    needs node
  • WebSockets and SSE

    Serve WebSockets and server-sent events through the proxy, and give a service's second port its own hostname.

    • self.ports.<name>
    • hosts[].port
    • devlanes debug freeze
    • devlanes exec
    • Vite
    • Hono
    • TypeScript
    needs node
  • Wildcard tenants

    Serve every tenant on its own subdomain with a wildcard host, while exact hostnames and a fallback gateway take the rest.

    • hosts wildcard
    • hosts.fallback
    • domain()
    • lanes.vars
    • tasks.when: lane.create
    • Hono
    • TypeScript
    needs node
  • Fake SMS and email providers per lane

    Swap SMS and email providers for local fakes, so each lane's messages land in its own inbox.

    • services.<name>.public_url
    • tags
    • devlanes stop
    • Hono
    • TypeScript
    needs node

Frameworks

Dev servers that devlanes runs through a preset.

  • Cloudflare Workers

    Run two Cloudflare Workers with the wrangler preset, joined by a service binding that resolves inside the lane.

    • preset: wrangler
    • wrangler.vars
    • wrangler.args
    • lane.data_path
    • lanes.hosts_file
    • hosts[].port
    • and 1 more
    • Cloudflare
    • Hono
    • TypeScript
    needs node
  • Cloudflare Vite plugin per lane

    Run a React app and a Worker in one Vite server, with an inspector port and stored state of its own in each lane.

    • preset: vite
    • self.ports.<name>
    • hosts.host_header
    • DEVLANES_LANE_DATA
    • Cloudflare
    • React
    • Vite
    • Hono
    • TypeScript
    needs node
  • Quarkus with Gradle and Postgres per lane

    Run Quarkus dev mode from Gradle with its own Postgres container and debugger port in each lane.

    • run_script (build.gradle.kts)
    • preset: quarkus
    • self.ports.<name>
    • infra.per_lane
    • infra.setup
    • ready.http.timeout
    • Postgres
    • Docker
    • Java
    needs java, docker

Infra

Databases and other containers, shared between lanes or one for each.

  • Shared Postgres with a database per lane

    Share one Postgres container between lanes and give each lane its own database, migrated on every start.

    • infra.compose
    • infra.project_name
    • infra.setup
    • infra.teardown
    • lanes.vars
    • tasks.when
    • and 3 more
    • Postgres
    • Docker
    • Hono
    • TypeScript
    needs node, docker
  • Postgres per lane

    Give each lane its own Postgres container while Redis stays shared, and delete a lane's container together with its data.

    • infra.per_lane
    • DEVLANES_COMPOSE_LANE_PROJECT
    • infra.setup
    • infra.teardown
    • lanes.vars
    • devlanes lane clean
    • and 1 more
    • Redis
    • Postgres
    • Docker
    • Hono
    • TypeScript
    needs node, docker
  • Many datastores with a namespace per lane

    Share Postgres, Redis, ClickHouse, RabbitMQ and an S3 store across lanes, with a namespace in each one for every lane.

    • infra.setup
    • infra.teardown
    • infra.per_lane
    • infra.hosts
    • infra.hidden
    • infra.project_name
    • and 1 more
    • ClickHouse
    • RabbitMQ
    • Redis
    • Postgres
    • Docker
    • Hono
    • TypeScript
    needs node, docker
  • Plain containers and external ports

    Run containers without Compose, such as a mock OIDC provider for each lane, and route a hostname to a server you start yourself.

    • infra.containers
    • infra.hosts
    • infra.external
    • devlanes.local.yaml
    • devlanes exec
    • OpenID Connect
    • Docker
    • Hono
    • TypeScript
    needs node, docker

Workflows

How a team repository uses devlanes day to day.

  • Profiles and tags

    Group the seven services of an npm workspace with tags and templates, and start a different set of them with each profile.

    • tags
    • templates
    • extends
    • profiles
    • autostart
    • keep_awake
    • and 2 more
    • Hono
    • TypeScript
    needs node
  • Queue workers per lane

    Run two replicas of a worker that has no port and finishes the job in hand before it stops.

    • replicas
    • replica.index
    • ready.log
    • keep_awake
    • stop.signal
    • pty
    • and 5 more
    • Redis
    • Vite
    • Docker
    • Hono
    • TypeScript
    needs node, docker
  • pnpm workspace with turbo and a second project

    Run a pnpm and turbo monorepo with a service for each package, next to a second project in a subdirectory.

    • run_script
    • templates
    • tags
    • preset: vite
    • tasks.when: lane.create
    • projects.<name>.services
    • and 2 more
    • pnpm
    • Turborepo
    • React
    • Vite
    • Hono
    • TypeScript
    needs node, pnpm
  • Dev servers and production builds from one folder

    Switch a lane between dev servers and a production build with a profile, and keep personal settings in devlanes.local.yaml.

    • profiles
    • run_scripts
    • extends
    • lane.data_path
    • autostart
    • devlanes --file
    • and 2 more
    • React
    • Vite
    • Hono
    • TypeScript
    needs node
  • Dotenv and one domain root

    Read values from a gitignored .env that every worktree shares, and build each URL from the lane's domain.

    • env.<NAME>
    • global_env
    • lane.domain
    • project.primary_path
    • devlanes reload
    • Hono
    • TypeScript
    needs node
  • From mprocs to devlanes

    Move a project from mprocs, Caddy and a hand-made port script to devlanes, one piece at a time.

    • profiles
    • tags
    • tasks
    • tasks.after
    • hosts
    • self.port
    • and 4 more
    • Caddy
    • Hono
    • TypeScript
    • Shell
    needs node
  • Run tests against a lane with devlanes with

    Wrap a test run in devlanes with, which starts a lane, gives the tests its HTTPS URLs and stops it afterwards.

    • devlanes with
    • DEVLANES_PUBLIC_URL_<SERVICE>
    • profiles.run_scripts
    • tasks.profiles
    • devlanes exec
    • devlanes wait
    • GitHub Actions
    • Vite
    • Hono
    • TypeScript
    needs node

Showcase

Larger stacks for trying the TUI and seeing failures.

  • A tour of the TUI

    Walk through the TUI key by key, on the same stack as the demo on devlanes.run.

    • devlanes
    • infra.per_lane
    • infra.hosts
    • infra.setup
    • infra.teardown
    • lanes.vars
    • and 6 more
    • Redis
    • Postgres
    • React
    • Vite
    • Docker
    • Hono
    • TypeScript
    needs node, docker
  • Forty services and the start gate

    Start 40 services at once and watch the start gate queue them, with CPU and memory shown for each one.

    • templates
    • tags
    • ready.log
    • startup
    • devlanes start --all-at-once
    • devlanes debug top
    • Hono
    • TypeScript
    needs node
  • Services built to fail

    Break services on purpose and read what devlanes and the proxy's error pages say about each failure.

    • devlanes debug why
    • devlanes debug errors
    • devlanes config check
    • ready.http
    • ready: started
    • templates
    • and 2 more
    • Hono
    • TypeScript
    needs node

Remote

Lanes that run on another machine and open on yours.

  • Remote box in Docker

    Run lanes on a box inside a Docker container and open them from your machine under the same hostnames.

    • remote.boxes.<name>.command
    • devlanes daemon pair
    • devlanes remote connect
    • devlanes daemon revoke
    • hidden
    • sync
    • Docker
    • Shell
    needs docker
  • Remote SSH box

    Prepare a Linux server as a devlanes box and connect to it over SSH, Tailscale or Cloudflare Tunnel.

    • devlanes remote connect
    • devlanes daemon pair
    • devlanes remote ls
    • ports.range
    • SSH
    • Tailscale
    • Cloudflare
    • Shell
    needs a linux box, ssh, node