In this demo I’ll be showing you how to use the Angular 4 CLI (command line interface) to get an Angular 4 website up and running on Node quickly. This will be the prerequisite for the next Jitsi series of tutorials where I will embed a Jitsi client into and Angular 4 app.
First let’s install the Angular CLI globally so that we can use it in future projects without having to install it again locally.
Open a command prompt (as Administrator) and run the NPM installer
npm install -g @angular/cli
When the NPM Install has completed open a file explorer window and let’s create a directory for our new files
Here I am using the path C:\demos\basic-angular-4
Back in your command window go to the directory you just created
Now get the Angular CLI tool to create our new project and run it on a Node JS http server
In the command window type
ng new basicAngular4
After pressing enter the command will run. It will take a few minutes to set things up, but it will be worth the wait by setting everything you need up to get running quickly.
When the new project creation has finished go to the newly created project directory
and get NPM to compile our TypeScript and start a Node JS Web Server instance to serve our angular files.
You will notice that in the screen output it tell you that Node will be serving your files locally on a specific port – on mine it’s 4200
Open your web browser and type in the address specified in the NPM start output