Just wanted to ask. Is it possible for a Nest Microservice to also expose a Rest API?
Like, what I am thinking is that suppose I have an Accounts microsercice. Is it possible for it to expose an API (say, a CRUD API to create accounts and such), and also listen ti incoming messages/publish incoming messages? So, suppose a Billing service sends a message that a payment was declined. Can the Accounts service listen to that too and lock the associated account in response to the received message?
I ask because it kinda looks like from the docs that it’s an either/or thing. Either you expose a REST api or you function as a Microservice.
Thank you.