Skip to content

Latest commit

 

History

History
67 lines (47 loc) · 1.87 KB

README.md

File metadata and controls

67 lines (47 loc) · 1.87 KB

Azure Functions NX Plugin

Develop a full serverless Azure Functions solution in NX monorepo

This plugin allows you to initialize, create, build, run and publish Azure Functions inside your NX workspace.


Quick Start

  1. Make sure your environment is set as described in the Azure Functions docs.
  2. Create an NX workspace with any method.
npx create-nx-workspace@latest my-org
  1. Add the @nxazure/func package
npm install -D @nxazure/func
  1. Initialize a function app
nx g @nxazure/func:init my-new-app
  1. Add a function to the app
nx g @nxazure/func:new my-new-func --project=my-new-app --template="HTTP trigger"
  1. Run the function app
nx start my-new-app

Known possible issues

  1. If after creation the build is failing, try updating @types/node and/or typescript versions.
  2. To be able to publish a function to your Azure account, an az login is required first.

Features

  1. Support for TS Config paths (e.g., import { tool } from '@my-org/my-lib')
  2. Support for a single node_modules folder in the root dir (just like in other monorepo solutions)
  3. All current templates that are supported by the func CLI tool are supported.
  4. Run multiple functions at once nx run-many --target=start --all
  5. Publish the function app straight to your Azure account (az login is required)

Limitations

Currently, the plugin supports only TypeScript functions.