@rockstat/rock-me-ts
TypeScript icon, indicating that this package has built-in type declarations

1.8.0 • Public • Published

RockME TS

Library with main components that needs for building Rockstat microservice on Node.js using TypeScript

Usage

Simple components

const log = new Logger(config.log);
const meter = new Meter(config.meter);

this.log = log.for(this);
this.log.info('Starting service');

Redis RPC

// setup Redis
const redisFactory = new RedisFactory({ log, meter, ...config.redis });

// Setup RPC
const channels = [config.rpc.name, BROADCAST];
const rpcOptions: AgnosticRPCOptions = { channels, redisFactory, log, meter, ...config.rpc }
this.rpcAdaptor = new RPCAdapterRedis(rpcOptions);
this.rpc = new RPCAgnostic(rpcOptions);

this.rpc.setup(this.rpcAdaptor);
this.rpc.register(BROADCAST, this.chw.write);

Readme

Keywords

none

Package Sidebar

Install

npm i @rockstat/rock-me-ts

Homepage

rstat.org

Weekly Downloads

6

Version

1.8.0

License

Apache-2.0

Unpacked Size

170 kB

Total Files

154

Last publish

Collaborators

  • madiedinro