Skip to content

Instantly share code, notes, and snippets.

@ggondim
Last active June 17, 2020 23:44
Show Gist options
  • Save ggondim/226aeb983083774963a1bd4421804220 to your computer and use it in GitHub Desktop.
Save ggondim/226aeb983083774963a1bd4421804220 to your computer and use it in GitHub Desktop.
Azure Monofunction example - Function script
const app = require('azure-monofunction');
const routes = [{
path: '/example/:param',
methods: ['GET', 'PUT'],
run: async (context) => {
context.res.body = { it: 'works' };
},
}]
app.addRoutes(routes);
module.exports = app.listen();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment