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