fmvilas / asyncapi-websockets-example

An example demoing how to use AsyncAPI and WebSockets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WebSockets echo server

Project generated using the AsyncAPI generator nodejs-ws template.

Usage

Install dependencies:

npm install

Start the server:

sudo npm start

sudo required to listen on port 80

Open the file index.html file with a browser, and follow the instructions there.

Tweaking the number of times a message is echoed

If you want to change the number of times a message is echoed, go edit the index.html and change the number on the following line:

const times = 4;

Refresh to see the difference.

About

An example demoing how to use AsyncAPI and WebSockets


Languages

Language:JavaScript 63.8%Language:HTML 31.9%Language:Dockerfile 4.2%