Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Button dashboard code
module['exports'] = function dashboard (hook) {
function get(key, callback) {
var datastore = hook.datastore;
datastore.get(key, function (err, counter) {
callback(counter || 0);
});
}
get('counter', function (counter) {
hook.res.end(counter);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.