Nothing, Plus More

    @cheep/transport-nats
    TypeScript icon, indicating that this package has built-in type declarations

    0.2.0 • Public • Published

    NATS transport for Cheep

    Basic example:

    import { NatsTransport } from '@cheep/transport-nats'
    
    const transport = new NatsTransport({
      moduleName: 'Test',
      natsServerUrls: ['nats://127.0.0.1:1222'],
    })
    
    await transport.init()
    
    transport.on('PING', async () => 'PONG')
    
    await transport.start()
    
    const result = await transport.execute({
      route: 'PING',
      payload: {},
    })
    
    expect(result).toBe('PONG')
    
    await transport.dispose()

    Install

    npm i @cheep/transport-nats

    DownloadsWeekly Downloads

    13

    Version

    0.2.0

    License

    none

    Unpacked Size

    13.2 kB

    Total Files

    8

    Last publish

    Collaborators

    • ezeki
    • kylebjordahl