Run the services you change, get the rest for free.
Linkup lets you combine local and remote services to create cheap yet complete development environments by leveraging Cloudflare Workers and Tunnels under the hood.
A web application is usually made of many services, and a change typically touches one or two of them. With Linkup, the services you didn't change are shared, and each request is routed to either your machine, a PR preview deploy or the shared environment.
You'll need a Cloudflare account with a domain that Linkup can use.
Build and install the CLI from source (requires a Rust toolchain):
cargo install --git https://github.com/endformdev/linkup linkup-cliDeploy the Linkup worker and the rest of the infrastructure to your Cloudflare
account (see Deploy Linkup to Cloudflare for
details). When it finishes, it prints the worker_url and worker_token to
use in your config.
linkup infra \
--email you@example.com \
--api-key <api-key> \
--account-id <account-id> \
--zone-ids <zone-id> \
deployDescribe your services in a config file:
linkup:
worker_url: https://where.linkup.is.deployed.com
worker_token: worker_token_from_linkup_deploy
services:
- name: web
remote: https://web-dev.hosting-provider.com
local: http://localhost:3000
- name: backend
remote: https://api-dev.hosting-provider.com
local: http://localhost:9000
domains:
- domain: dev-domain.com
default_service: web
routes:
- path: /api/v1/.*
service: backendPoint Linkup at it with the LINKUP_CONFIG environment variable (or pass
--config to each command):
export LINKUP_CONFIG=/path/to/linkup.yamlThen start a session and route the service you're working on to your machine:
linkup start # Start a session and get your session URLs
linkup route local web # Send `web` traffic to your local dev server
linkup status # See where each service is routed and whether it's healthy
linkup stop # Stop the session and revert env filesThe full documentation lives in docs/.
This repository started as a fork of mentimeter/linkup, originally built by Mentimeter, and is now developed independently.
