Skip to content

Allow discovery of functions in nested directories #5373

Closed
@ryancole

Description

@ryancole

As far as I'm aware, the func host start command currently requires a directory structure in which the function.json files reside in directories that are siblings to the host.json - or the function project root. So, currently a directory structure something like ..

project-root/
  host.json
  function-one/
    function.json
  function-two/
    function.json

I'm familiar with the two config options for specifying script location and entry point, but those two still require that the function host can discover the function.json.

Would it be possible to add a config option to allow the function host to discover functions that are nested deeper than one directory? Perhaps something that might let me structure a directory like ...

project-root/
  host.json
  src/
    account/
      get-all/
        function.json
      get-single/
        function.json
      create/
        function.json
    client/
      get-all/
        function.json

... and so on.

With this, in combination with the already existing options to specify script location, you could pretty much structure a more complex functions app in any way you want. It'd work great with multi-function typescript projects, where the compiled output goes into a lib folder, as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions