diff --git a/PLAYBOOK-NEST.md b/PLAYBOOK-NEST.md index 180a4b309..2e83555b3 100644 --- a/PLAYBOOK-NEST.md +++ b/PLAYBOOK-NEST.md @@ -3,6 +3,8 @@ DIY NestJS Playbook creating NestJS project and generate nest artifacts with-in monorepo. +> An Introduction to [NestJS](https://www.joshmorony.com/an-introduction-to-nestjs-for-ionic-developers/) + ### Prerequisites #### Install Global Packages diff --git a/PLAYBOOK.md b/PLAYBOOK.md index a3c2d6376..27fb90c1e 100644 --- a/PLAYBOOK.md +++ b/PLAYBOOK.md @@ -101,7 +101,7 @@ ng update --all # also run `npm outdated` and update versions in package.json then run `npm install` # generate webapp app -ng g app webapp --routing --style=scss --prefix=ngx --tags=app-module +ng g app webapp --routing --style=scss --prefix=ngx --unit-test-runner=jest --tags=app-module # add Jest to replace karma as testing framework ng generate jest diff --git a/apps/api/src/core/interceptors/transform.interceptor.ts b/apps/api/src/core/interceptors/transform.interceptor.ts index 85d77bf08..dbb50ae80 100644 --- a/apps/api/src/core/interceptors/transform.interceptor.ts +++ b/apps/api/src/core/interceptors/transform.interceptor.ts @@ -3,13 +3,9 @@ import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { classToPlain } from 'class-transformer'; -export interface Response { - data: T; -} - @Injectable() -export class TransformInterceptor implements NestInterceptor> { - intercept(context: ExecutionContext, call$: Observable): Observable> { - return call$.pipe(map((data: Observable) => classToPlain(data, { excludePrefixes: ['_id'] }))); +export class TransformInterceptor implements NestInterceptor { + intercept(context: ExecutionContext, call$: Observable): Observable { + return call$.pipe(map(data => classToPlain(data, { excludePrefixes: ['_id'] }))); } } diff --git a/stories/faq.md b/stories/faq.md index 2ac2daf67..2ead8c92e 100644 --- a/stories/faq.md +++ b/stories/faq.md @@ -59,6 +59,7 @@ once you are conferable , then you can delete demo `default` app > Read [medium-clap](https://medium.com/@yonatandoron/how-i-implemented-the-medium-clap-from-scratch-4a16ac90ad3b) > Read [Must-have animations for Chatbots](https://uxdesign.cc/must-have-animations-for-chatbots-15c031fd6bd3) > Read [The ultimate guide to proper use of animation in UX](https://uxdesign.cc/the-ultimate-guide-to-proper-use-of-animation-in-ux-10bd98614fa9) +> Read [Microinteractions: small details matter](https://uxdesign.cc/microinteractions-detailed-design-9113c88946d0) * Why I Prefer NGXS over NGRX > Read [NGXS vs NGRX](https://blog.singular.uk/why-i-prefer-ngxs-over-ngrx-df727cd868b5?gi=405262c5a9c5) @@ -151,6 +152,10 @@ semantic-release is a fully automated library/system for versioning, changelog g > Refer [Example 1](https://github.com/angular-university/angular-material-course/tree/2-data-table-finished/src/app/course) > Refer [Example 2](https://github.com/angular/material2/blob/master/src/material-examples/table-http/table-http-example.ts) +* How to setup NestJS Project? + +> Refer [An Introduction to NestJS](https://www.joshmorony.com/an-introduction-to-nestjs-for-ionic-developers/) + * Shoud I use mergeMap or concatMap or switchMap or forkJoin for my usecase? > *Short Answer*: concatMap for writes, mergeMap for reads, switchMap when you have to cancel http call.