Integration guides for every backend.
Step-by-step walkthroughs to get Redge running with D1, Turso, SQLite, Postgres, MySQL, and more.
Cloudflare D1
Deploy Redge alongside Workers with native D1 integration.
Create D1 database
wrangler d1 create redgeGet database ID
wrangler d1 info redgeSet environment
D1_API_TOKEN=your_token
DATABASE_URL=d1://account/idRun Redge
go run ./cmd/redgeBenefits
- Native Workers integration
- Global edge deployment
- Built-in analytics
Turso / libSQL
Global SQLite distribution with instant replication.
Create Turso database
turso db create redgeGet connection string
turso db show redgeConfigure Redge
DATABASE_URL=libsql://example.turso.io
TURSO_AUTH_TOKEN=tokenRun Redge
go run ./cmd/redgeBenefits
- Global replication
- SQLite compatibility
- Simple backups
SQLite (Local)
Perfect for development, single-node, or edge deployments.
Set database URL
DATABASE_URL=sqlite://redge.dbCreate data directory
mkdir -p dataRun Redge
go run ./cmd/redgeConnect client
redis-cli -h localhost -p 6379 pingBenefits
- Zero setup
- No network latency
- Easy to inspect (.db file)
PostgreSQL
Leverage existing Postgres infrastructure and expertise.
Create database
createdb redgeGet connection string
postgres://user:pass@localhost/redgeConfigure Redge
DATABASE_URL=postgres://user:pass@localhost/redge?sslmode=disableRun Redge
go run ./cmd/redgeBenefits
- Familiar tooling
- Advanced replication
- Enterprise support
MySQL
Connect Redge to existing MySQL deployments.
Create database
mysql -u root -p -e "CREATE DATABASE redge;"Get connection string
mysql://user:pass@tcp(localhost:3306)/redgeConfigure Redge
DATABASE_URL=mysql://user:pass@tcp(localhost:3306)/redge?parseTime=trueRun Redge
go run ./cmd/redgeBenefits
- Existing infrastructure
- Proven reliability
- Cluster support
Patterns
Common deployment architectures
Single-Node Development
SQLite backend, Redge running locally.
Ideal for
Solo developers, prototyping, CI/CD testing
Edge + SQL
Lightweight Redge at edge, shared SQL backend.
Ideal for
Multi-region, global teams, edge compute platforms
Managed Cloud
Redge Cloud endpoints with provisioned backends.
Ideal for
Production teams, enterprises, operational simplicity
Getting Started
5 minutes to your first Redge
# Clone the repo git clone https://github.com/pubflow/redge cd redge # Set SQLite database (simplest option) export DATABASE_URL=sqlite://redge.db # Build and run go mod tidy go run ./cmd/redge # In another terminal, test with redis-cli: redis-cli -p 6379 set hello world ex 60 redis-cli -p 6379 get hello redis-cli -p 6379 zadd leaderboard 100 alice 85 bob redis-cli -p 6379 zrange leaderboard 0 -1 withscores
Ready for production?
Change DATABASE_URL to point to your Postgres, MySQL, Turso, or D1 endpoint. Same Redge code, different backend.
Deploy your Redge instance
Pick your backend, follow a guide, and start building with Redis compatibility and SQL durability.
