Node.js nats connector for nestjs apps
This is ready-made nats connection to nestjs apps with API to internal endpoints.
How to use
const client = new ClientNats({
url: 'nats://localhost:4222',
});
client.connect().then(async () => {
console.log('nats has been connected..');
const notificationNode = new NotificationNode(client, 5000); // 5000 is timeout in ms
await notificationNode.sendCompanyRegistrationEmail({
emailTo: "foo@cybernetix.de",
language: "de",
spaceName: "foo",
username: "bar"
});
})