Slide 1

Slide 1 text

Full Stack Angular With NestJS Andrew Wiens Oasis Digital Solutions

Slide 2

Slide 2 text

What Is Nest? “[Nest is] a progressive Node.js framework for building efficient, reliable and scalable server-side applications.” 2

Slide 3

Slide 3 text

Nest’s Goal: Create Backends Using Angular Concepts 3

Slide 4

Slide 4 text

Nest is Taking Off! 4 +4.5x in 1 Year

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

Nest CLI 7

Slide 8

Slide 8 text

Blank Nest CLI Project 8

Slide 9

Slide 9 text

Example App 9

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

Nx CLI Project 11

Slide 12

Slide 12 text

Andrew Wiens andywiens.net 12 Example App Repo: git.io/JeZBQ