Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Beginning Server-Side Application Development with Angular

You're reading from   Beginning Server-Side Application Development with Angular Discover how to rapidly prototype SEO-friendly web applications with Angular Universal

Arrow left icon
Product type Paperback
Published in Apr 2018
Publisher
ISBN-13 9781789342161
Length 110 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Bram Borggreve Bram Borggreve
Author Profile Icon Bram Borggreve
Bram Borggreve
Arrow right icon
View More author details
Toc

Generating the Server App


Since Angular CLI version 1.6, there has been a generator for adding support for Angular Universal. It does this by adding a second app to the Angular CLI config, .angular-cli.json.

We will refer to this new app as our server app, and the one we worked with in the previous lesson will be called our browser app.

So, what are the differences between the browser and server apps?

  • Both load another platform which behaves differently.

  • The browser app uses code splitting, which builds the app in various smaller files. This improves load times in the browser. The server builds the app without code splitting as there are no benefits to do this on the server.

  • The browser app loads a greater number of polyfills. These are small JavaScript libraries that add functionality to the browser, if the browser does not support them yet. This is not needed for the server.

Let's explore in some more detail what happens when we run the generator:

Running this generator will change a few things...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime