syumai/workers-go

Go package to run an HTTP server on Cloudflare Workers.

Go

1,168

687 commits

updated Sep 23, 2026

See the code

README

workers-go

Go Reference Discord Server

  • workers-go is a Go module to run an HTTP server written in Go on Cloudflare Workers. Its root package is workers.
  • This package can easily serve http.Handler on Cloudflare Workers.
  • Caution: This is an experimental project.

Documentation: https://workers-go.syumai.dev — feature support, per-platform guides, the full binding reference, and the FAQ live there.

Installation

go get github.com/syumai/workers-go

Usage

Implement your http.Handler and give it to workers.Serve().

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

Quick Start

  • You can easily create and deploy a project from Deploy to Cloudflare button.

Deploy to Cloudflare

  • If you want to create a project manually, please follow the guide below.

Requirements

  • Node.js (and npm)
  • Go 1.24.0 or later

Create a new Worker project

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

Initialize the project

  1. Navigate to your new project directory and initialize Go modules:
cd my-app
go mod init
go mod tidy
  1. Start the development server:
npm start
  1. Verify the worker is running:
curl http://localhost:8787/hello

You will see "Hello!" as the response.

Learn more

cloudflare
cloudflare-workers
go
golang

syumai/workers-go

Go package to run an HTTP server on Cloudflare Workers.

Go

1,168

687 commits

updated Sep 23, 2026

See the code

README

workers-go

Go Reference Discord Server

  • workers-go is a Go module to run an HTTP server written in Go on Cloudflare Workers. Its root package is workers.
  • This package can easily serve http.Handler on Cloudflare Workers.
  • Caution: This is an experimental project.

Documentation: https://workers-go.syumai.dev — feature support, per-platform guides, the full binding reference, and the FAQ live there.

Installation

go get github.com/syumai/workers-go

Usage

Implement your http.Handler and give it to workers.Serve().

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

Quick Start

  • You can easily create and deploy a project from Deploy to Cloudflare button.

Deploy to Cloudflare

  • If you want to create a project manually, please follow the guide below.

Requirements

  • Node.js (and npm)
  • Go 1.24.0 or later

Create a new Worker project

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

Initialize the project

  1. Navigate to your new project directory and initialize Go modules:
cd my-app
go mod init
go mod tidy
  1. Start the development server:
npm start
  1. Verify the worker is running:
curl http://localhost:8787/hello

You will see "Hello!" as the response.

Learn more

cloudflare
cloudflare-workers
go
golang

Project health

Latest release

v0.36.0 · Sep 21, 2026

Releases this year

2

Significant stargazers

(top 24 of 30)

Ferhat Elmas

329 followers · starred Oct 2023

Juho Vepsäläinen

2,224 followers · starred Sep 2026

Doug Tangren

972 followers · starred Mar 2026

Lucas Bremgartner

197 followers · starred Feb 2026