Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.
/ node-geckoboard Public archive
forked from Hebo/node-geckoboard

Easily create geckoboard widgets

Notifications You must be signed in to change notification settings

skilitics/node-geckoboard

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

var app        = require('express').createServer(),
    GeckoBoard = require('geckoboard');

gecko = 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:

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

    respond(null, res);
});

app.listen(3000, function() {
    console.log('Listening on port 3000');
});

Cool, now check out your api at localhost:3000/widget/live-users.

Check out the examples folder for more info.

API Keys

If you set an API key, the server will use HTTP basic auth. Your key goes in the username field.

About

Easily create geckoboard widgets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%