title: nestjs - how to use shared modules between nestjs applications
body: <p>Let's say I have NestJs project, that consists of following parts, each with it's own git repository and deployed on different machines:</p>
  <ol>
  <li>Api service</li>
  <li>Message-queue processing workers service</li>
  </ol>
  <p>Both of the services require part #3 - library for accessing RabbitMq.
  Let's say that #3 is some abstraction around the RabbitMq client that defines entities and services, that access MQ, so the modules #1. and #2. doesn't even know, they are working with RabbitMq. #3 is planned to be included / used as a library in #1 and #2, not as a microservice.</p>
  <p>How should this be integrated together?
  Let's assume it from the perspective of API service:</p>
  <ul>
  <li>It has the RabbitMq module inside the node_modules folder.</li>
  <li>I want to use e.g. dependency injection in that RabbitMq library. Ideally, expose it as NestJs module, to be used in @Module imports of API module.</li>
  </ul>
  <p>Should I use NestJs as peerDependency in the RabbitMq module?</p>
  <p>I have like 3-4 shared-modules I need to share between the modules #1 and #2. Not just MQ.</p>