Skip to content

Latest commit

 

History

History
47 lines (40 loc) · 952 Bytes

README.md

File metadata and controls

47 lines (40 loc) · 952 Bytes

Chat Room

This is example use of the edc-ws npm package.

Don't forget to run npm install & npm run build

Running the Chat Room

First you must run the server:

npm run server

Then start up as many clients as you would like:

npm run client

The client will prompt you with a username & password

Username?  testUser
Password?  password
Connecting to server, testUser
testUser: Hello!

As users join the server they will brodcast the message <username>: Hello!

Sending a Message

To send a message to a user type > followed by a username (no spaces); enter and type your message on the next line.

User: jake

Username?  jake
Password?  password
Connectiong to server, jake
jake: Hello!
>john
> How are you today?

The other user john should see this

Username?  john
Password?  password
Connectiong to server, john
john: Hello!
jake: Hello!
jake: How are you today?