Skip to content

Zero-configuration Go backend support

1 min read

Go API backends can now be deployed on Vercel with zero-configuration deployment.

main.go
package main
import (
"fmt"
"net/http"
"os"
)
func main() {
port := os.Getenv("PORT")
if port == "" {
port = "3000"
}
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello World")
})
addr := ":" + port
fmt.Printf("Listening on %s\n", addr)
http.ListenAndServe(addr, nil)
}

Vercel now recognizes Go servers as first-class backends and automatically provisions the right resources and configures your application without redirects in vercel.json or the /api folder convention.

Backends on Vercel use Fluid compute with Active CPU pricing by default. Your Go API scales automatically with traffic, and you pay only for active CPU time rather than idle capacity.