Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

worker-go

Deploy to Cloudflare

  • A template for starting a Cloudflare Worker project with Go.
  • This template uses workers package to run an HTTP server.

Notice

  • Go (not TinyGo) with many dependencies may exceed the size limit of the Worker (3MB for free plan, 10MB for paid plan). In that case, you can use the TinyGo template instead.

Usage

  • main.go includes simple HTTP server implementation. Feel free to edit this code and implement your own HTTP server.

Requirements

  • Node.js
  • Go 1.23.0 or later

Getting Started

Development

Commands

npm start      # run dev server
# or
go run .       # run dev server without Wrangler (Cloudflare-related features are not available)
npm run build  # build Go Wasm binary
npm run deploy # deploy worker

Testing dev server

  • Just send HTTP request using some tools like curl.
$ curl http://localhost:8787
Hello, Go!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages