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

_examples/websocket/basic: add a nodejs client and provide a README.md on how to run the websocket clients and the server

Former-commit-id: a98a80996d7d95fa947e72c71803407682229fa7
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-06-13 12:15:01 +03:00
parent 5f148987f7
commit 272566950d
14 changed files with 126 additions and 92 deletions

View File

@@ -40,7 +40,7 @@ var serverEvents = websocket.Namespaces{
func main() {
app := iris.New()
websocketServer := websocket.New(
websocket.DefaultGorillaUpgrader, /*DefaultGobwasUpgrader can be used as well*/
websocket.DefaultGorillaUpgrader, /* DefaultGobwasUpgrader can be used too. */
serverEvents)
// serves the endpoint of ws://localhost:8080/echo
@@ -54,5 +54,5 @@ func main() {
// serves the npm browser websocket client usage example.
app.StaticWeb("/browserify", "./browserify")
app.Run(iris.Addr(":8080"))
app.Run(iris.Addr(":8080"), iris.WithoutServerError(iris.ErrServerClosed))
}