Wondering what’s next for npm?Check out our public roadmap! »

    @dnode/messages

    1.0.0 • Public • Published

    dependencies | 2 | 17

    Usage

    Sender

    const messages = await require('@dnode/messages')({
      redisUrl: process.env.REDIS_URL,
    });
    const id = messages.send({ example: 'example' });

    Receiver

    const messages = await require('@dnode/messages')({
      redisUrl: process.env.REDIS_URL,
    });
    messages
      .handle(async (message, id) => {
        console.log(`--- message (id: ${id})`);
        console.log(message);
      })
      .on('error', (err, message) => {
        console.log(err);
      });

    Keywords

    none

    Install

    npm i @dnode/messages

    DownloadsWeekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    3.81 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar