JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 983
  • Score
    100M100P100Q113856F

Node.js wrapper for creating Geckoboard widgets.

Package Exports

  • geckoboard

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (geckoboard) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

This module makes it slightly easier to define api widgets for geckoboard

Install

npm install geckoboard

Basic Usage

Create a GeckoBoard client and pass in an express instance:

GeckoBoard = GeckoBoard.createClient({
    server: app,
    path: '/widget',
    key: 'asdf123'
});

and then define request handlers with request. Call the respond function with error, data to render your response to the API:

GeckoBoard.request("live-users", function(respond) {
    res = {item: [{
                text: "",
                "value" : 123
            }, {
                text: "",
                value: 238
            }]
    };

    respond(null, res);
});