Skip to content

Instantly share code, notes, and snippets.

@ggondim
Created June 18, 2020 00:06
Show Gist options
  • Save ggondim/4ce55fcf3b2f9abdbd6a4fd0f1f6687a to your computer and use it in GitHub Desktop.
Save ggondim/4ce55fcf3b2f9abdbd6a4fd0f1f6687a to your computer and use it in GitHub Desktop.
Azure Monofunction example - User Controller
async function getUser({ req, res, params }) {
context.res.body = await db.getUser(params.id);
}
async function createUser({ req }) {
context.res.status = await db.createUser(req.body);
}
module.exports = {
getUser,
createUser,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment