npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@google/rbmwebhookclient

v1.0.0

Published

Dev support for local testing without webhooks.

Downloads

13

Readme

RBM Webhook Client - Node.js

The RBM Partner-based Model supports Webhooks which makes local development and testing hard. Changing code and deploying to a public web server takes time and slows development.

The RBM Webhook Client is a development library that allows you to develop and test your code locally. The client library connects to a hosted server using Socket.IO. You configure your agent-level webhook to point to our service and your agent will then receive notifications.

Limitations

This library is made available for development and test only. You must use webhooks for your production deployment. Our implementation consumes and disguards any notifications when your agent code is not running so if you try to use it in production, you will soon find that you miss many messages.

Setup

Include this in the dependencies section of your package.json file:

"@google/rbmwebhookclient": "^1.0.0",

Regularly check npm for the latest version.

In your code you simply add:

const RbmWebhookClient = require('@google/rbmwebhookclient');

// Receives RBM notifications
function eventHandler(msg) {
  console.log(msg);
}

new RbmWebhookClient(eventHandler);

Operation

When you first run your code you will see lines like this in your console or application log:

RbmWebhookClient: WEBHOOK NOT YET VERIFIED
RbmWebhookClient: Your webhook for this RBM agent is https://rbm-webhook-server.appspot.com/callback/<uuid>
RbmWebhookClient: Set this as your agent-level webhook in the RBM developer console and verify.
  • Go to the RBM Developer Console.
  • Select your agent, then Integrations and Webhook.
  • Set the webhook to the URL displayed.
  • Set the token to the UUID at the end of the URL.
  • Select Verify.

You will see the following message in your console or application log:

RbmWebhookClient: Webhook is now verified.

You are now receiving notifications while your application is running.

Your UUID is stored in token.txt. Now when you start your applicaton you will see:

RbmWebhookClient: Connected to server https://rbm-webhook-server.appspot.com/<uuid>
RbmWebhookClient: Receiving notifications.