1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00

add server side events via broker example (based on external resource but it is fairly good for a simple SSE showcase)

Former-commit-id: 926c2a88bf1c44354a99654bc85e267b940723b8
This commit is contained in:
Gerasimos (Makis) Maropoulos
2018-07-31 03:12:16 +03:00
parent badea8b9c5
commit 2b72aadb15
6 changed files with 185 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
// +build go1.11beta1
// +build go1.11beta2
package main
import (
@@ -8,7 +8,7 @@ import (
)
func main() {
// GOARCH=wasm GOOS=js /home/$yourusername/go1.11beta1/bin/go build -o hello.wasm hello_go11beta1.go
// GOARCH=wasm GOOS=js /home/$yourusername/go1.11beta1/bin/go build -o hello.wasm hello_go11beta2.go
js.Global().Get("console").Call("log", "Hello WebAssemply!")
message := fmt.Sprintf("Hello, the current time is: %s", time.Now().String())
js.Global().Get("document").Call("getElementById", "hello").Set("innerText", message)