- fork this repository & create a new branch for your work
- write all of your code in a directory named
lab-+<your name>e.g.lab-susan - push to your repository
- submit a pull request to this repository
- submit a link to your PR in canvas
- write a question and observation on canvas
- students will understand how to implement a TCP server using the
netmodule - students will understand how to work with node.js EventEmitter's
Your lab directory must include
.gitignore.eslintpackage.jsonREADME.md
- create a TCP Server using the NodeJS native
netmodule - create a
ClientConstructor - when sockets connect to the server, a new
Clientinstance should be made - all clients should have a unique
idproperty - this should come from the use ofnode-uuid - when sockets are connected with the client pool they should be given event listeners for
data,error, andcloseevents - when a socket emits the
closeevent, the socket should be removed from the client pool - when a socket emits the
errorevent, the error should be logged on the server - when a socket emits the
dataevent, the data should be logged on the server and the commands below should be implemented
@allshould trigger a broadcast event@nicknameshould allow a user change their nickname@dmshould allow a user to send a message directly to another user by nick name or by their guest id (unique client id)- when a user sends a message, their nickname should be printed
- i.e.
cfcrew: sup hackerz
- i.e.
- write a paragraph about your project
- write documentation on how to get the project running
- write documentation on how to connect to the server
- no testing required for this lab - yay!
