1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 02:17:05 +00:00

update some examples

Former-commit-id: 2ed7c323dd379eb68d5ccb2044cd9cc772ce0b08
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-05-05 22:03:01 +03:00
parent c10dd32ad7
commit cc19f80049
14 changed files with 20 additions and 19 deletions

View File

@@ -5,8 +5,8 @@ import (
)
/*
You need to build the hello.wasm first, download the go1.11 and execute the below command:
$ cd client && GOARCH=wasm GOOS=js /home/$yourname/go1.11/bin/go build -o hello.wasm hello_go111.go
You need to build the hello.wasm first, download the go1.14 and execute the below command:
$ cd client && GOARCH=wasm GOOS=js /home/$yourname/go1.14/bin/go build -o hello.wasm hello_go114.go
*/
func main() {
@@ -17,7 +17,8 @@ func main() {
app.HandleDir("/", "./client")
app.Get("/", func(ctx iris.Context) {
ctx.ServeFile("./client/hello.html", false) // true for gzip.
// ctx.Gzip(true)
ctx.ServeFile("./client/hello.html")
})
// visit http://localhost:8080