Project generated with Angular CLI version 11.1.4.
ng build
Before running the web app we need to prepare the associated chat server, we must run the backend (chat server) and then
use the exposed APIs to manage a chat rooms (see chat-server-with-nestjs-and-websocket README.md)
Run ng serve for a dev server. Navigate to http://localhost:4200/.
Before connecting to a room, we need to create it in the backend first, example:
To crete a room demo-room on the backend we call the endpoint
POST http://localhost:3000/api/v1/rooms
with body:
{"roomId": "demo-room","creatorUsername": "your-username"}
-
Url template:
http://localhost:4200/?room={roomId}&user={username}&avatar={avatarUrl}Example: the members of
demo-roomteam can chat on roomdemo-roomusing the following urls: -
The members can also chat on room
demo-roomusing the UI:
Create Socket config on app.module.ts
like: const config: SocketIoConfig = { url: 'http://localhost:3000', options: {}};
and then add this module Socket config SocketIoModule.forRoot(config) on imports. It will connect the Socket part of
the app to the server.



