You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
424 B
22 lines
424 B
// +build disabled
|
|
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
"net/http"
|
|
)
|
|
|
|
func main() {
|
|
const wasm = "/app.wasm"
|
|
|
|
http.Handle("/", http.FileServer(http.Dir(".")))
|
|
http.HandleFunc(wasm, func(w http.ResponseWriter, r *http.Request) {
|
|
w.Header().Set("Content-Type", "application/wasm")
|
|
http.ServeFile(w, r, "."+wasm)
|
|
})
|
|
|
|
fmt.Println("Listening at http://localhost:8080/")
|
|
log.Fatal(http.ListenAndServe(":8080", nil))
|
|
}
|
|
|