Created
June 18, 2020 00:10
-
-
Save ggondim/28f3553d225c68b2fe25beae767b98c9 to your computer and use it in GitHub Desktop.
Azure Monofunction example - Index of function with separated routes file
This file contains 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
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