Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

sbuslab/sbus-node

Repository files navigation

sbus

Service Bus for NodeJs services with RabbitMQ transport

import { Builder } from 'builder-pattern';
import { Orders } from 'my_models/orders';
import { Order } from 'my_models/order';
import { GetOrders } from 'my_models/getOrders';

await sbus.on<Orders>("get-orders", async (req: GetOrders, context: Context) => {
    return Builder(Orders)
        .orders([new Order(), new Order()])
        .build();
});

const res = await sbus.request<Orders>("get-orders", Builder(GetOrders)
    .id(123)
    .build());

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published