Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 663 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 663 Bytes

WEBSOCKET EXAMPLE

This example uses node.js and the ws library. Clientside is pure javascript with HTML 5.

INSTALL

Prerequisites

  • Nodejs
  • Npm

Install

Clone the Git Repo.

Install all npm dependencies (ws, requirejs)

npm install

Usage

In project directory and a Terminal, to start the websocket server

npm start

Let the Terminal openend so you can see Status messages from the server.

Open the client.html both times in a browser of your choice. Open the Console in both browsers. Click the send test message button to send a test message to the server and the server will broadcoast to all connected clients in realtime!