Book Image

Beginning Server-Side Application Development with Angular

By : Bram Borggreve
Book Image

Beginning Server-Side Application Development with Angular

By: Bram Borggreve

Overview of this book

Equip yourself with the skills required to create modern, progressive web applications that load quickly and efficiently. This fast-paced guide to server-side Angular leads you through an example application that uses Angular Universal to render application pages on the server, rather than the client. You'll learn how to serve your users views that load instantly, while reaping all the SEO benefits of improved page indexing. With differences of just 200 milliseconds in performance having a measurable impact on your users, it's more important than ever to get server-side right.
Table of Contents (10 chapters)

Installing Angular CLI


Angular CLI is the officially supported tool for creating and developing Angular applications. It is an open source project that is maintained by the Angular team and is the recommended way to develop Angular applications.

Angular CLI offers the following functionality:

  • Create a new application

  • Run the application in development mode

  • Generate code using the best practices from the Angular team

  • Run unit tests and end-to-end tests

  • Create a production-ready build

One of the main benefits of using Angular CLI is that you don't need to configure any build tools. It's all abstracted away and available through one handy command: ng.

Throughout the book, we will be using the ng command for creating the app, generating the code, running the application in development mode, and creating builds.

Note

For more information about Angular CLI, refer to the project page on GitHub (https://github.com/angular/angular-cli)

To install Angular CLI on your machine, perform the following steps:

  1. Open your terminal.

  2. Run the following command:

    npm install –g @angular/cli@latest
  3. Once the installation is finished without any errors, make sure that the ng command works as expected by running the following command:

    ng --version
  4. Verify that the output is similar to the output shown here:

In this section, we have installed Angular CLI. We can start building our application!