{"version":"1.0","type":"rich","title":"The correct shared module for Nest.js - https://blog.entrostat.com/setting-up-a-database-module-in-nest-js/","description":"This example shows how to structure a shared Nest.js module that integrates TypeORM with a database connection. The `SharedModule` imports `DatabaseModule` and uses `TypeOrmModule.forFeature` to register the `User` entity for a specific database connection, while also exporting `DatabaseModule` and `UserService` for reuse elsewhere. The code relies on Nest.js decorators like `@Module`, `@Injectable`, and the TypeORM API, with configuration accessed via `Config.get.databases.main.name`.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-eedde62e2284f92ccd17d40934c1392b?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}