Open mildronize opened 10 months ago
The official repo has been developing hook feature
https://github.com/Azure/azure-functions-nodejs-library/labels/hooks
https://github.com/Azure/azure-functions-nodejs-worker/issues/664
Be make sure type safe during middleware
func
.httpGet('hello')
.use(( ctx, next )=> {
return next({
ctx,
data: 'my injected data'
});
})
.handler(async ({ data } ) => ({ body: data }) );
// The result will be 'my injected data'
Consider to add middleware at 2 levels:
app
(NammathamApp) andfunc
level.However,
NammathamApp
doesn't handle request or triggers by itself, consider to add middleware forfunc
level will be easier to manipulate.Expected Behavior
Related Repo: