Last active
September 20, 2016 14:34
-
-
Save olliahonen/8f28c92bbe663a807abca464de81bf13 to your computer and use it in GitHub Desktop.
Webtask try-out
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var kukke = function (ctx, cb) { | |
ctx.storage.get(function (error, data) { | |
if (error) return cb(error); | |
var a = data || 0; | |
a++; | |
ctx.storage.set(a, function (error) { | |
if (error) return cb(error); | |
var msg = 'Hello, you are viewer number ' + a | |
cb(null, { | |
"message": msg, | |
"yay": "Zelsinki", | |
"code": "https://gist.github.com/olliahonen/8f28c92bbe663a807abca464de81bf13", | |
}); | |
}) | |
}) | |
} | |
module.exports = kukke; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment