Azure / Azure/azure-functions-nodejs-worker

Get rid of host.json

Open
#598 0 comments 1 reaction 0 assignees View on GitHub
area:nodejs-functions feature needs discussion P3
Dominant language
TypeScript
Stars
110
Forks
51
Avg merge
1d 1h
Merged PRs (30d)
2

Description

This issue is also related to the new programming model we're currently working on, but probably is outside the scope of this effort.

In the same way we're getting rid of the need for `function.json` files with the new programming model, and allowing the worker to provide the necessary metadata to the host, we _could_ also git rid of the `host.json` file, and supply whatever metadata there to the host through the worker. An example would be:

```TS
const app = new FunctionApp(/* contents of host.json */);

app.addTimerFunction('TimerTrigger1', { schedule: '0 */5 * * * *', }, timerTrigger1);
```

This would get rid of an extra configuration JSON file, allow users to reduce boilerplate, by us providing defaults when appropriate, and providing intelliscence for `host.json` properties. However, this would require significant changes on the Functions Host side, since currently only the host is able to read `host.json` files, and the settings there are needed to configure some Host settings, before even spinning up a language worker. If work is done on the Host side to enable an alternative workflow, this may also impact cold start times. All this would be to ultimately get rid of one configuration file, as opposed to potentially hundreds of `function.json` files.

This issue is to collect feedback and discussion around this proposal and whether it's worth investing time and resources into.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.