mirror of
https://github.com/mpolden/echoip.git
synced 2024-11-10 15:37:24 +01:00
Serve assets
This commit is contained in:
parent
98e914c608
commit
f1d987d8f9
@ -51,6 +51,8 @@ func handler(w http.ResponseWriter, req *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
http.Handle("/assets/", http.StripPrefix("/assets/",
|
||||||
|
http.FileServer(http.Dir("assets/"))))
|
||||||
http.HandleFunc("/", handler)
|
http.HandleFunc("/", handler)
|
||||||
err := http.ListenAndServe(":8080", nil)
|
err := http.ListenAndServe(":8080", nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user