Bare-bones WebSocket ping-pong implementation with Node.js. For testing & educational purposes only.
Hosted on https://nodejs-ws-ping-pong.herokuapp.com
- NPM
- Node.js (tested on 17.8.0)
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: