Azure / Azure/azure-functions-nodejs-library
Should first parameter for http triggers be route or function name
- Dominant language
- TypeScript
- Stars
- 70
- Forks
- 35
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 6
Description
Some feedback [here](https://github.com/Azure/azure-functions-nodejs-worker/issues/480#issuecomment-1236224667) from @ChuckJonas
> Is the first parameter the route? Or just the function name? I'm hoping it's the former as this would make it similar to other popular JS frameworks.
Fwiw, we did have the route as the first parameter in one of the prototypes (see [here](https://github.com/ejizba/func-nodejs-prototype/blob/user-study-ts/Option3/src/main.ts#L8)), but we got mixed feedback on that. Sure, it's more similar to express, but a lot of people view the function name as very important. Our initial decision was to use the function name for the sake of simplicity and to be consistent with other triggers. We are considering a _true_ express.js programming model and that may be the better place to use route as the first parameter, tracked here: https://github.com/Azure/azure-functions-nodejs-library/issues/16
Contributor guide
Assessment
This issue has not been assessed yet.