F1uctus / nodejs-ws-ping-pong

Bare-bones WebSocket ping-pong implementation with Node.js. For testing & educational purposes only.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Node.js WebSocket Ping-Pong

Bare-bones WebSocket ping-pong implementation with Node.js. For testing & educational purposes only.

Hosted on https://nodejs-ws-ping-pong.herokuapp.com

Prerequisites

  • NPM
  • Node.js (tested on 17.8.0)

Testing

Running a simple client-server communication test:

cd server
npm start &
export SERVER_PID=$!
sleep 3
cd ../client-nodejs
npm test
kill $SERVER_PID
cd ..

To test the Heroku deployment, one should instead do:

export NJWSPP_REMOTE=heroku
cd client-nodejs
npm test
cd ..

Testing from the browser:

https://nodejs-ws-ping-pong.herokuapp.com/client.html

About

Bare-bones WebSocket ping-pong implementation with Node.js. For testing & educational purposes only.

License:The Unlicense


Languages

Language:JavaScript 82.6%Language:HTML 17.2%Language:Procfile 0.2%