1
votes

I've exhausted the Azure Function documentation and cannot figure out how to deploy a TypeScript Azure Function and include the Node.js dependencies. I'm using VSCode Azure Functions tool to deploy my serverless code on a Linux server.

I cannot use the Kudu service as it is only available for Windows Azure Functions

I've tried including a package.json in both the root directory of my Azure Function app and the literal function folder itself.

Any pointers would be much appreciated!

1

1 Answers

0
votes

Here is few things.

  1. Create project using func tools func init --worker-runtime typescript
  2. Install typings module @azure/functions - if not installed
  3. Build project npm run build:production
  4. If you want you can even publish using func azure functionapp publish <APP_NAME>

To use types

import { AzureFunction, Context, HttpRequest } from "@azure/functions"

You can check documentation