79546585

Date: 2025-03-31 15:11:34
Score: 0.5
Natty:
Report link

In NodeJS model v4, azure functions allows you can configure your nodejs project's main entry point and thus can configure multiple folders.

For folder structure like this

FunctionsProject
 | - functions
 | | - function1.ts
 | | - function2.ts
 | - folder1
 | | - folder1function1.ts
 | | - folder1function2.ts
 | - folder2
 | | - folder2function1.ts
 | | - folder2function2.ts
 | - node_modules
 | - dist
 | - host.json
 | - package.json

Your package.json file contents

{
   ...
   "main": "dist/{index.js,functions/*.js,folder1/*.js,folder2/*.js}",
   ...
}

See documention here. https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-node?tabs=typescript%2Cwindows%2Cazure-cli&pivots=nodejs-model-v4#registering-a-function

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: shahid610169