Created
July 1, 2018 18:33
-
-
Save wordyallen/85d01aef59b276b8930be9fe6aaafee1 to your computer and use it in GitHub Desktop.
functionz
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
module.exports.hello = function (context, req) { | |
context.log('JavaScript HTTP trigger function processed a request.'); | |
if (req.query.name || (req.body && req.body.name)) { | |
res = { | |
// status: 200, /* Defaults to 200 */ | |
body: "Hello " + (req.query.name || req.body.name) | |
}; | |
} | |
else { | |
res = { | |
status: 400, | |
body: "Please pass a name on the query string or in the request body" | |
}; | |
} | |
context.done(null, res); | |
}; | |
module.exports.helloQueue = function (context, queueItem) { | |
context.log('JavaScript queue trigger function processed work item', queueItem); | |
context.bindings.blobOut = { | |
"hello": "world" | |
} | |
context.done(); | |
};% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment