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
- Host: GitHub
- URL: https://github.com/tans105/websocket-demo-client
- Owner: tans105
- Created: 2020-05-15T15:23:35.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-28T18:31:20.000Z (about 6 years ago)
- Last Synced: 2025-06-10T11:52:02.787Z (12 months ago)
- Topics: angular, chat-application, socket-client, websocket-client
- Language: TypeScript
- Homepage:
- Size: 52.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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