NestJS Bootcamp Session 7: Dynamic Modules, Configuration, and State Management - بوت کمپ آموزشی

Mostafa
Mostafa
47 بار بازدید - پارسال - Join us in the seventh
Join us in the seventh session of our NestJS Bootcamp, where we delve deeper into the workings of NestJS. This session explores the concept of dynamic modules and how to create ones that other developers can use effectively.

We start by learning to create NestJS libraries using the 'nest g lib' command, leading us to the development of our openai module. The session then shifts to understanding how to utilize ConfigModule effectively.

The latter part of the session unravels how to create asynchronous dynamic modules, whose dependencies can be provided by others. We demonstrate this by providing the openai API key through the ConfigModule's config service.

The session also includes a segment on request scope, where we show how to use the provided API key through headers. We introduce the concept of transient providers and develop a transient logger service that developers can set its context.

A significant part of the session is dedicated to managing state in services, highlighting the need for transient scope in stateful services. This session is packed with hands-on examples and insightful discussions, making it a must-watch for anyone looking to master NestJS.

تو این جلسه با مفهوم ماژول داینامیک آشنا شدیم و از این طریق دیگه از الان به بعد می‌تونیم ماژول‌های به درد بخور و همه منظوره بنویسیم
یکی از خوبی‌های این جلسمون این بود که با مفهوم کتابخونه آشنا شدیم و فهمیدیم که میشه یه محیط کاملا مجزا داشته باشیم و ماژولمون رو ببریم اونجا.
پارسال در تاریخ 1402/03/24 منتشر شده است.
47 بـار بازدید شده
... بیشتر