diff --git a/README-wasm.md b/README-wasm.md index 26db38a..faf9685 100644 --- a/README-wasm.md +++ b/README-wasm.md @@ -39,10 +39,11 @@ import ( ) func main() { - log.Fatal(http.ListenAndServe(":8080", - http.FileServer(http.Dir("/path/to/dir/to/serve")) - )) + log.Fatal(http.ListenAndServe(":8080", + http.FileServer(http.Dir("/path/to/dir/to/serve")), + )) } + ``` To see the webpage with this example, you can type in `localhost:8080/tcell.html` into your browser while `server.go` is running. @@ -51,4 +52,10 @@ To see the webpage with this example, you can type in `localhost:8080/tcell.html It is recomended to use an iframe if you want to embed the app into a webpage: ```html -``` \ No newline at end of file +``` + +## Other considerations + +### Accessing files + +`io.Open(filename)` and other related functions for reading file systems do not work; use `http.Get(filename)` instead. \ No newline at end of file