Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Full Stack Angular with NestJS

Drew Wiens
September 28, 2019

Full Stack Angular with NestJS

Angular enables us to build large scale and demanding apps in a simplified and structured way. Today, rapid changes in technology make sure that we are always trying to learn new things. However, once in a while, a new technology lets us leverage our existing experience. Enter NestJS: the backend framework inspired by Angular. Many of the design patterns in Angular are reused NestJS, making it a breeze to use coming from Angular. With Angular and NestJS, there is no need to learn completely separate methodologies on the frontend and backend. In this talk you’ll learn how to build backends for Angular apps more productively with NestJS and TypeScript.

Drew Wiens

September 28, 2019
Tweet

More Decks by Drew Wiens

Other Decks in Programming

Transcript

  1. What Is Nest? “[Nest is] a progressive Node.js framework for

    building efficient, reliable and scalable server-side applications.” 2
  2. Angular Equivalents in Nest Angular Nest Purpose @NgModule @Module Code

    organization @Component @Controller Behavior for elements (Angular) and endpoints (Nest) @Injectable @Injectable Services PipeTransform PipeTransform Data transformation (Angular & Nest) and validation (Nest) CanActivate CanActivate Route guards HttpInterceptor NestInterceptor Modify/react to HTTP requests/responses 5
  3. Layout of a Nest App • Features grouped into modules

    • Modules can import other modules • Modules are singletons ◦ Can import in several places ◦ Can re-export any module • Register controllers in modules • Modules provide services & pipes ◦ Scoped to the module 6
  4. Next Steps • Unify client & server with Nrwl Nx

    ◦ Can create shared TS libraries ◦ All npm scripts & deps in one package.json ◦ Nx CLI supports Nest ◦ Easy monorepos • Unit tests with Nest ◦ Default: Jest • The Nest docs ◦ Very well-written 10