Skip to content

Instantly share code, notes, and snippets.

@ggondim
Created June 18, 2020 00:10
Show Gist options
  • Save ggondim/28f3553d225c68b2fe25beae767b98c9 to your computer and use it in GitHub Desktop.
Save ggondim/28f3553d225c68b2fe25beae767b98c9 to your computer and use it in GitHub Desktop.
Azure Monofunction example - Index of function with separated routes file
const app = require('azure-monofunction');
const AuthMiddleware = require('auth-middleware');
const routes = require('./routes');
app.useIf(context => context.meta.auth, new AuthMiddleware(authInfo));
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