Skip to content

Instantly share code, notes, and snippets.

@gboncoffee
Created December 17, 2023 03:09
Show Gist options
  • Save gboncoffee/72e8f4594dfe8a646865321155e2d139 to your computer and use it in GitHub Desktop.
Save gboncoffee/72e8f4594dfe8a646865321155e2d139 to your computer and use it in GitHub Desktop.
The simplest static web server in Go
package main
import "net/http"
func main() {
port := ":6969"
handler := http.FileServer(http.Dir("."))
http.ListenAndServe(port, handler)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment