15 lines
298 B
Go
15 lines
298 B
Go
package main
|
|
|
|
import "net/http"
|
|
|
|
func main() {
|
|
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
|
http.ServeFile(w, r, "index.html")
|
|
})
|
|
|
|
fs := http.FileServer(http.Dir("assets"))
|
|
http.Handle("/assets/", http.StripPrefix("/assets/", fs))
|
|
|
|
http.ListenAndServe(":8080", nil)
|
|
}
|