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

https://github.com/tans105/websocket-demo-client

A simple websocket based client for a chat app
https://github.com/tans105/websocket-demo-client

angular chat-application socket-client websocket-client

Last synced: 27 days ago
JSON representation

A simple websocket based client for a chat app

Awesome Lists containing this project

README

          

### Websocket client

An angular based client application to communicate with a websocket server.

The server should support 2 messaging endpoints

- /chat.sendMessage - Public messaging
- /chat.addUser - When adding a new user

Connection to the server gets established once users enter the details. With right listeners in place, we can capture the user joining and leaving events.

To run this
- clone the repo
- Goto the repo path
- Dev
- Make sure the `api_url` is configured in the `environment.ts` file.
- run `ng serve`.
OR
- To run from a node/express server
- Make sure the `api_url` is configured in the `environment.ts` file.
- run `ng build --aot --prod`.
- This will generate distributable directory (`dist`). Copy the `dist` & `server.js` in the same directory
- run `node server.js` if you want to deploy it on a server

Screens