Branch | Status | Runtime Version | Support level | Node.js Versions |
---|---|---|---|---|
v3.x (default) | 4 | GA | 20, 18 |
NOTE: The branch corresponds to the worker version, which is intentionally decoupled from the runtime version.
- Clone the repository locally and open in VS Code
- Run "Extensions: Show Recommended Extensions" from the command palette and install all extensions listed under "Workspace Recommendations"
- Run
npm install
andnpm run build
- Create or open a local function app to test with
- In the local function app, add the following settings to your "local.settings.json" file or configure them directly as environment variables
-
languageWorkers__node__workerDirectory
:<path to the root of this repository>
-
languageWorkers__node__arguments
:--inspect
💡 Tip #1: Set
logging__logLevel__Worker
todebug
if you want to view worker-specific logs in the output offunc start
💡 Tip #2: If you need to debug worker initialization, use
--inspect-brk
instead of--inspect
. Just keep in mind you need to attach the debugger within 30 seconds or the host process will timeout.
-
- Start the local function app (i.e. run
func start
or press F5) - Back in the worker repository, press F5 and select the process for your running function app
- Before you submit a PR, run
npm run lint
andnpm test
and fix any issues. If you want to debug the tests, switch your launch profile in VS Code to "Launch Unit Tests" and press F5.
These are the most important GitHub repositories that make up the Node.js experience on Azure Functions:
- azure-functions-nodejs-library: The
@azure/functions
npm package that you include in your app. - azure-functions-nodejs-worker: The other half of the Node.js experience that ships directly in Azure.
- azure-functions-nodejs-e2e-tests: A set of automated end-to-end tests designed to run against prerelease versions of all Node.js components.
- azure-functions-host: The runtime shared by all languages in Azure Functions.
- azure-functions-core-tools: The CLI used to test Azure Functions locally.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
The type definitions supplied by the @azure/functions
npm package are located in the types
folder. Any changes should be applied directly to ./types/index.d.ts
. Please make sure to update the tests in ./types/index.test.ts
as well.