Chapter 15. Server-side Rendering with Angular Universal
If you are not familiar with the Angular platform for client-side application development it is worth taking a look into. Nest.js has a unique symbiotic relationship with Angular because they are both written in TypeScript. This allows for some interesting code sharing between your Nest.js server and Angular app, because Angular and Nest.js both use TypeScript, and classes can be created in a package that is shared between the Angular app and the Nest.js app. These classes can then be included in either app and help keep the objects that are sent and received over HTTP requests between client and server consistent. This relationship is taken to another level when we introduce Angular Universal. Angular Universal is a technology that allows your Angular app to be pre-rendered on your server. This has a number of benefits such as:
- Facilitate web crawlers for SEO purposes.
- Improve the load performance of your site.
- Improve performance...