I have a NestJS backend which calls out to a NestJS microservice. The provider looks like this:
const microserviceProvider = {
provide: SERVICE_NAME,
useFactory: () => {
return ClientProxyFactory.create({
transport: Transport.TCP,
options: {
host: 'http://my-microservice-name-here.onrender.com',
port: 8080,
},
});
},
};
In development this works fine - I use 0.0.0.0 at the host. When I deploy them to render.com, this code throws an ENOTFOUND error:
[Nest] 24050 - 02/12/2023, 6:26:34 PM ERROR [ClientTCP] Error: getaddrinfo ENOTFOUND https://my-application-name-here.onrender.com:8080
Does anyone have advice for what I should be doing differently? I am able to set up other NestJS services fine (frontends, backends) - but this is my first time trying to deploy a microservice.
Thanks for any help!