Skip to content

workers-go

TrendingActive
syumai/workers-go

A Go module for running an HTTP server written in Go on Cloudflare Workers — serve any http.Handler with workers.Serve().

View on GitHub
Stars
1.2k
Forks
85
Watchers
1.2k
Open issues
29

Overview

workers-go is a Go module (root package workers) for running an HTTP server written in Go on Cloudflare Workers. It serves any standard http.Handler. The project describes itself as experimental.

Installation

go get github.com/syumai/workers-go

Usage

func main() {
	http.HandleFunc("/hello", func(w http.ResponseWriter, req *http.Request) { /* ... */ })
	workers.Serve(nil) // nil serves http.DefaultServeMux
}

Quick start

Requires Node.js and Go 1.24 or later. Create a project from the template with:

npm create cloudflare@latest -- --template github.com/syumai/workers-go/_templates/cloudflare/worker-go

or use the Deploy to Cloudflare button. The documentation covers feature support, platform guides and the full binding reference.

Similar open-source projects, ranked by shared categories and tags.

All SDK projects →