Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Updated the README to include the publish process

Signed-off-by: Alex Pshul <[email protected]>
  • Loading branch information
AlexPshul authored Jun 9, 2024
1 parent cc0831f commit 5187563
Showing 1 changed file with 35 additions and 7 deletions.
42 changes: 35 additions & 7 deletions packages/func/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ This plugin allows you to initialize, create, build, run and publish Azure Funct
</p>
<hr>

## Table of Contents
1. [Quick Start](#quick-start)
2. [Features](#features)
3. [Known possible issues](#known-possible-issues)
4. [Publish to Azure](#publish-to-azure)
5. [Limitations](#limitations)

## Quick Start

1. Make sure your environment is set as described in the [Azure Functions docs](https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-typescript#configure-your-environment).
Expand Down Expand Up @@ -46,13 +53,6 @@ nx start my-new-app

<br/>

## 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](https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli) is required first.

<br/>

## Features

1. Support for TS Config paths (e.g., `import { tool } from '@my-org/my-lib'`)
Expand All @@ -63,6 +63,34 @@ nx start my-new-app

<br/>

## 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](https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli) is required first.

<br/>

## Publish to Azure

1. Sign in to Azure
```bash
az login
```

2. Make sure you select the correct subscription
```bash
az account set --subscription "<subscription ID or name>"
```

You can learn more about it on [Microsoft Learn](https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli).

3. Use the name of your local NX app and the name of your existing function app on Azure to run the publish command:
```bash
nx publish <local-app-name> -n <function-app-on-azure>
```

4. Wait for the process to finish and the triggers to properly sync

## Limitations

Currently, the plugin supports only TypeScript functions.

0 comments on commit 5187563

Please sign in to comment.