Skip to content

Instantly share code, notes, and snippets.

@jvns

jvns/serve.go Secret

Created Nov 17, 2021
Embed
What would you like to do?
package main
import (
"net/http"
"os"
)
func main() {
wd, err := os.Getwd()
if err != nil {
panic(err)
}
println("http://localhost:8080/")
panic(http.ListenAndServe(":8080", http.FileServer(http.Dir(wd))))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment