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 Dependencies


Angular comes with support for service workers. In order to use it, we first need to install the dependencies.

  1. Open the terminal in the project directory.

  2. Install the dependencies needed using the npm command:

    npm install @angular/service-worker
  3. When the installation is successful, we should see the new package added to the dependencies object in our project's package.json file:

In this section, we have installed the dependencies for our service worker, which is the first step in implementing service workers in our app. Let's move on to the next section, where we will enable the service worker in our application.