Code Monkey home page Code Monkey logo

azure-functions-nodejs-worker's Introduction

Branch Status
master Build Status
dev Build Status

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-nodejsWorker.js>
    • 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 [email protected] 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.

azure-functions-nodejs-worker's People

Contributors

dependabot[bot] avatar hannesne avatar irnc avatar kashimiz avatar mhoeger avatar microsoftopensource avatar msftgits avatar nelak avatar pragnagopa avatar wkwkhautbois avatar yojagad avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.