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:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user