NestJS Async Local Storage | Write Cleaner Code

Поділитися
Вставка
  • Опубліковано 5 лис 2024

КОМЕНТАРІ • 18

  • @mguay
    @mguay  9 місяців тому

    Get my highly rated Udemy courses here at a discount: michaelguay.dev/udemy/

  • @AbdelrhmanHussien-sx8vb
    @AbdelrhmanHussien-sx8vb 5 місяців тому

    I knew that there is a smart way to achieve this behavior but I don't know how. Smart one explains it amazingly. Simply you are awesome

  • @weforyouweb1165
    @weforyouweb1165 Рік тому +9

    Pls create more videos on advanced NEST JS

  • @maxyushin
    @maxyushin 5 місяців тому

    Thank you for great materials! About this one I have a concern though: isn’t this technique suggesting to deal with some kind of global variables? Like in php, globals are accessible everywhere and could be changed everywhere. It simplifies work with them at the begging, but it also becomes an issue very fast.
    Would appreciate your thought on this and/or links to theory of this technique.

  • @mayori-engineering-hub
    @mayori-engineering-hub Рік тому

    Will be nice to have use cases of this patterns

  • @samiullahsheikh5015
    @samiullahsheikh5015 Рік тому

    can you please suggest some active communities for nodeJS, NestJS and typeORM? like the more or less the same stack of yours

  • @gosnooky
    @gosnooky Рік тому +2

    Interesting. I've always attached metadata to the request object directly, added the type augmentations to make TS happy, and created custom decorators that retrieve that information from the request and inject into controller handler arguments. This looks much cleaner using request-scoped data. I always avoided scoping providers to request because all child providers also become request scoped.
    Love advanced NestJS stuff. There is a real dearth of advanced NestJS videos, I was considering making videos myself, but I hate my voice and I can't articulate :)

    • @kerodfresenbetgebremedhin1881
      @kerodfresenbetgebremedhin1881 Рік тому +2

      you'll never know for sure until you try and receive audience feedback

    • @mguay
      @mguay  Рік тому +2

      You should absolutely do it. Trust me, no one likes the sound of their own voice!

    • @chess4964
      @chess4964 Рік тому

      @@mguay absolutely coz we grew tired of hearing it all our life

  • @dt43321
    @dt43321 Рік тому

    With this approach, can we access the auth user (provided with JWT), only for that request scope (like PHP), anywhere in the application? If we can, it really helps me.

    • @mguay
      @mguay  Рік тому

      Yes!

    • @dt43321
      @dt43321 11 місяців тому

      @@mguay I tested with concurrent requests and it doesn't work. I want to let you know.

  • @DustinTownsend
    @DustinTownsend Рік тому

    Have you tried NestJS CLS package for this?

    • @mguay
      @mguay  Рік тому +2

      Yeah I highly recommend. Altogether I like to try it without a dependency first

  • @bayoumi-tech
    @bayoumi-tech Рік тому

    Thank you for your effort ❤

  • @nolw.7805
    @nolw.7805 Рік тому

    Thanks you so much for your work.

  • @davidho2901
    @davidho2901 Рік тому

    Great content. However could you please work on your vocal Range. Sometimes it feels uncomfortable with your base tones like someone just woke up.