This project is an angular application, written using Typescript version 2.0.0, and Angular CLI version 1.0.0-beta.32.3.
The application requires the websocket sever to be running, otherwise, it will fail to start.
You may refer to the server Readme to know how to launch it (npm start
).
The best way to run the application is to use the files in the dist/
folder.
To run a python server under Unix systems it is possible to use the following command:
$ cd dist
$ python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...
Then it is possible to navigate to localhost:8000 and see the application running.
When the app launches, the user is given a random nick name. This username is displayed at the top left corner
It is possible to change the username by clicking on this username. An editing field will appear, giving the possibility to update the username.
When submited the new username is broadcasted to everyone displaying an update message and updating the list of connected users.
In order to install the ng-cli you can visit the official documentation.
$ npm install --global @angular/cli
- There is a single chat room
- All connected users are visible in the room
- All users get auto-generated user names when they connect
- A user should be able to change their name
- All users can send and read messages
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the -prod
flag for a production build.