@azure/functions

The Node.js worker for the Azure Functions runtime - https://functions.azure.com

Showing:

Popularity

Downloads/wk

42.8K

GitHub Stars

69

Maintenance

Last Commit

3d ago

Contributors

23

Package

Dependencies

0

License

MIT

Type Definitions

Built-In

Tree-Shakeable

No?

Categories

Reviews

Average Rating

5.0/52
Read All Reviews
ravinderveerla
raviat4share

Top Feedback

1Easy to Use
1Performant
1Highly Customizable
1Bleeding Edge
1Responsive Maintainers

Readme

Azure Functions Node.js Worker

BranchStatusRuntime VersionSupport levelNode.js Versions
v3.xBuild Status4Preview14
v2.x (default)Build Status3GA (Recommended)14, 12, 10
v1.xBuild Status2GA (Maintenance mode)10, 8

NOTE: The branch corresponds to the worker version, which is intentionally decoupled from the runtime version.

Getting Started

Azure Functions Language Extensibility Wiki worker.config.json

  • git clone https://github.com/Azure/azure-functions-nodejs-worker
  • cd azure-functions-nodejs-worker
  • npm install
  • npm run build
    • Generates protobuf definitions & runs typescript compiler
  • npm test

Debugging and Testing

  • In the function app you are using to test, add the App Setting in local.settings.json languageWorkers:node:workerDirectory = <path to azure-functions-nodejs-worker directory>
    • This configures the functions host to use the development version of the worker
    • You can also configure languageWorkers:node:workerDirectory as an environment variable.
  • To debug, add the App Setting in local.settings.json languageWorkers:node:arguments = --inspect-brk
    • You can also configure languageWorkers:node:arguments as an environment variable.

Make sure that languageWorkers:node:workerDirectory and languageWorkers:node:arguments are set correctly. When you start your functions host, you should see your custom path to workerDirectory and any arguments you passed to the node. If it was not set correctly, your output may look like the default output: Starting language worker process:node "%userprofile%\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\workers\node\dist/src/nodejsWorker.js" --host 127.0.0.1 --port 5134 --workerId fd9b17c3-8ffb-49f7-a4e3-089a780e7a00 --requestId 14e27374-9395-42d4-a639-bd67e0e770a4 --grpcMaxMessageLength 134217728

Read more on local debugging in our docs.

Publishing

package.ps1 creates the nuget package for the worker.

It builds and webpacks the generated node files into a bundle. We include several grpc native modules, for x86/x64 versions of windows, osx, linux

The nuget package can be deployed from the appveyor job at: https://ci.appveyor.com/project/appsvc/azure-functions-nodejs-worker

Contributing

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Contributing to TypeScript type definitions

types/public/Interfaces.d.ts is a generated file from src/public/Interfaces.ts. If you want to add a change to Interfaces.d.ts, please make the change first to Interfaces.ts and then npm run build to generate the appropriate type definitions. Any additional type definition tests should go in test/InterfacesTest.ts.

Rate & Review

Great Documentation0
Easy to Use1
Performant1
Highly Customizable1
Bleeding Edge1
Responsive Maintainers1
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
Ravinder62 Ratings45 Reviews
Exploring the new technologies and frameworks
5 months ago

we use azure functions extensively for smaller /utility kind of functionalities, best part is functions are serverless so we are paying only when we use the resources, best for the applications where you don't want to allocate the dedicated/shared resource for rarely used applications we are saving lots with this approach. but we have to bare the little and ignorable cold start issues if we are choosing the serverless, if that is the matter we go for the app service plan.


0
raviat4share12 Ratings13 Reviews
5 months ago
Easy to Use
Performant
Highly Customizable
Bleeding Edge
Responsive Maintainers

we are working on serverless architecture using the azure functions since 6 months. the main reason we have chosen the Azure Functions because of its INPUT and OUTPUT Binders we have scenarios where we need this binder concept to flow the process seamlessly and configurable. these binders are very helpful if we want to decouple the system, some utilities we have executed rarely so we are saving some bucks using the consumption-based plan.


0

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial