This is the repository for the LinkedIn Learning course Websocket Communications with Node and Angular. The full
course is available from LinkedIn Learning.
See the readme file in the main branch for updated instructions and information.
The course was coded on the main branch of the repository. The branch has tags coinciding with each video. The tags
are named following the CHAPTER#_MOVIE# pattern. For instance, to see the state of the application at the beginning of
Chapter 1, Movie 3, you would need to branch out from tag 01_03 with git checkout b {{NEW_BRANCH_NAME}} 01_03
On Github, you can use the tag pop up menu to switch to a specific tag and navigate the course files at that stage, or
go directly to https://github.com/LinkedInLearning/websocket-comms-with-node-and-angular-2825709/tree/{{TAG_NAME}}.
The course was coded on the main branch of the repository. The branch has tags coinciding with each video. The tags
are named following the CHAPTER#_MOVIE# pattern. For instance, to see the state of the application at the beginning of
Chapter 1, Movie 3, you would need to branch out from tag 01_03 with git checkout b {{NEW_BRANCH_NAME}} 01_03
On Github, you can use the tag pop up menu to switch to a specific tag and view the course files at that stage, or go
directly to https://github.com/LinkedInLearning/websocket-comms-with-node-and-angular-2825709/tree/{{TAG_NAME}}.
When branching from a tag after making changes to the files, you may get a message like this:
error: Your local changes to the following files would be overwritten by checkout: [files]
Please commit your changes or stash them before you switch branches.
Aborting
To resolve this issue:
Add changes to git using this command: git add .
Commit changes using this command: git commit -m "some message"
- To code along with the instructor, you must have:
- NodeJS installed; the course was developed with node v16.4.0. Run
node -vto see your version - NPM installed; the course was developed with npm v8.3.0. Run
npm -vto see your version
- Clone this repository into your local machine using the terminal (Mac), CMD (Windows), or a GUI tool like SourceTree.
- Run
npm installto get all dependencies installed
The Chat product we're building is a monorepo made up of 3 distinct packages:
- The Shared Library exposes interfaces that are used by both the front and backend
- The Websocket Server is the backend in charge of managing websocket connections and relaying chat messages
- The Angular Web Application is the Chat application UI
The Monorepo is managed using the Nx build system to greatly simplify setup. Here are the commands used to scaffold each package (we'll go through them during the course):
npx nx generate @nrwl/workspace:library typesnpx nx generate @nrwl/node:app servernpx nx generate @nrwl/angular:app webapp --backendProject server --strict false --style scss --routing falsenpx nx generate @angular/material:ng-add --project=webapp --typography false --theme indigo-pink --animations trueAfter install, add the Angular material theming CSS file of your choice to the styles array of project.json. For example:
"node_modules/@angular/material/prebuilt-themes/indigo-pink.css"
Options are indigo-pink.css, deeppurple-amber.css, pink-bluegrey.css and purple-green.css
https://github.com/websockets/ws
https://rxjs.dev/api/webSocket/webSocket
https://chrome.google.com/webstore/detail/advanced-websocket-client/lgimpnfdefcpkicbflpmainbcdnlblej
https://addons.mozilla.org/en-US/firefox/addon/websocket-weasel/