【发布时间】:2019-12-08 03:37:21
【问题描述】:
我是 Web 程序集的新手
我在Hello_WebAssembly目录下的服务器index.htmlwasm_exec.jsmain.wasm写了一个web.go
然后我在终端go run web.go
然后我去 localhost:8080 它报告404 page not found
我按照https://github.com/golang/go/wiki/WebAssembly的指示进行操作
这是我的web.go 代码
package main
import (
"log"
"net/http"
)
func main() {
fs := http.FileServer(http.Dir("Hello_WebAssembly"))
http.Handle("/", fs)
log.Println("Listening...")
http.ListenAndServe(":8080", nil)
}
不知道为什么
希望有人能帮帮我
提前致谢
顺便说一下我的操作系统是win10
【问题讨论】:
标签: go webserver webassembly