How do you serve index.html (or some other static HTML file) using a go web server?
I just want a basic, static HTML file (like an article, for example) which I can
This is easy in golang as:
package main import ( "log" "net/http" ) func main() { log.Fatal(http.ListenAndServe(":8080", http.FileServer(http.Dir(".")))) }
`
You can just do this and make sure to keep your HTML file as index.html
index.html