Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fmvilas/asyncapi-websockets-example

An example demoing how to use AsyncAPI and WebSockets
https://github.com/fmvilas/asyncapi-websockets-example

Last synced: about 2 months ago
JSON representation

An example demoing how to use AsyncAPI and WebSockets

Awesome Lists containing this project

README

        

# WebSockets echo server

Project generated using the [AsyncAPI generator](https://github.com/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:

```js
const times = 4;
```

Refresh to see the difference.