dariuszparys / multi-websocket-sample

Multipath websocket sample

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample for using ws-multipath

The purpose of this sample is to have a websocket server to be hosted on azure as a starting point.

Running the server on Azure

  1. Build the container
docker build -f ./Dockerfile -t {youraccount}/multi-ws:1 .

In my case I created a container on docker hub and pushed it there

docker push {youraccount}/multi-ws:1
  1. Deploy container to Azure Container Instances

Read this short walkthrough how to create the instance and deploy the container

https://docs.microsoft.com/en-us/azure/container-instances/container-instances-quickstart

and don't forget to set expose port 80 through the portal or CLI.

  1. Call the websocket endpoint

To test the connection you can use wscat.

https://github.com/websockets/wscat

wscat --connection ws://1.2.3.4/foo
wscat --connection ws://1.2.3.4/bar

About

Multipath websocket sample

License:MIT License


Languages

Language:JavaScript 82.3%Language:Dockerfile 17.7%