Azure Functions extension for VS Code
Перейти к файлу
Nathan c556567e85
Upgrade appservice SDK for Flex Consumption support (#4200)
* Upgrade sdk and api-version

* Refactor create code to use sdk
2024-07-02 09:45:27 -07:00
.azure-pipelines Default `parameters.enableLongRunningTests` to `true` (#4194) 2024-06-19 11:51:12 -07:00
.github Don't install Ballerina 2024-03-12 11:09:11 -04:00
.husky Add sort pre-commit hook (#2969) 2021-09-29 17:33:00 -07:00
.vscode Improve local settings when creating templates (#3924) 2023-12-15 11:50:13 -08:00
resources Fix verified templates/counts (#4169) 2024-06-10 09:49:06 -07:00
src Upgrade appservice SDK for Flex Consumption support (#4200) 2024-07-02 09:45:27 -07:00
test Enable long running tests (#4195) 2024-06-20 11:18:02 -07:00
tools/JsonCli Convert JSON CLI tool pipeline to 1ES PT (#4119) 2024-05-03 10:57:50 -07:00
.eslintignore Enable unit tests (#3591) 2023-05-15 11:22:40 -07:00
.eslintrc.js Switch to shared ESLint config (#2916) 2021-08-13 10:40:56 -07:00
.gitattributes Create .gitattributes (#3208) 2022-06-01 12:09:08 -07:00
.gitignore Update templates and JsonCLI docs (#2975) 2021-09-22 17:28:46 -07:00
.nvmrc Use Node 18.15 (#3831) 2023-09-07 13:38:10 -07:00
.vscodeignore Switch to ESLint (#2666) 2021-02-12 11:31:51 -08:00
CHANGELOG.md change date (#4193) 2024-06-19 11:21:17 -07:00
CODE_OF_CONDUCT.md Add Code of Conduct and Security docs from template (#2768) 2021-04-13 11:52:12 -07:00
LICENSE.md Add functions explorer 2017-09-21 16:20:07 -07:00
NOTICE.html Changelog for v1.13.2 (#3962) 2024-01-31 14:16:50 -08:00
README.md Fix readme badges (#3379) 2022-10-18 14:28:13 -04:00
SECURITY.md Add Code of Conduct and Security docs from template (#2768) 2021-04-13 11:52:12 -07:00
SUPPORT.md Add support.md file (#2906) 2021-08-06 16:30:13 -07:00
extension.bundle.ts Enable unit tests (#3591) 2023-05-15 11:22:40 -07:00
gulpfile.ts Switch to latest VS Code test package (#3275) 2022-08-04 10:45:44 -07:00
main.js Revert main.js change (#3278) 2022-08-05 13:11:39 -07:00
package-lock.json Upgrade appservice SDK for Flex Consumption support (#4200) 2024-07-02 09:45:27 -07:00
package.json Upgrade appservice SDK for Flex Consumption support (#4200) 2024-07-02 09:45:27 -07:00
package.nls.json Remove private preview flag for Flex (#4151) 2024-05-20 13:36:20 -07:00
tsconfig.json Remove skipLibCheck (#3001) 2021-11-15 16:39:26 -05:00
webpack.config.js Update to utils v2 (#3707) 2023-06-13 13:03:47 -07:00

README.md

Azure Functions for Visual Studio Code

Version Installs Build Status

Use the Azure Functions extension to quickly create, debug, manage, and deploy serverless apps directly from VS Code. Check out the Azure serverless community library to view sample projects.

Visit the wiki for more information about Azure Functions and how to use the advanced features of this extension.

Sign up today for your free Azure account and receive 12 months of free popular services, $200 free credit and 25+ always free services 👉 Start Free.

Create your first serverless app

  1. Select the button to create a new project in the Azure Functions explorer

    createNewProject

  2. Select a new, empty folder to contain your project

  3. Select your desired programming language

  4. Select "HTTP trigger" for your project's first function

  5. Use "HttpTrigger1" as the function name

  6. Select "Anonymous" for the authorization level, which enables anyone to call your function endpoint without a key.

    To learn more about authorization levels, see here.

  7. If the selected folder is not already open, select "Open in current window" to open it

Run the serverless app locally

This extension integrates with the Azure Functions Core Tools to let you run your project locally before publishing to Azure.

  1. To start your project, press F5 or the "play" button

    debug

  2. If you do not have the Azure Functions Core Tools installed, you will be automatically prompted to install. Follow the specified instructions, or skip to the "Deploy" step if you would rather deploy without running locally.

    TIP: The "Terminal" panel should pop up automatically and you know your project is running if you see output

  3. Expand your local project in the Azure Functions explorer to copy your function's url

    debug2

  4. Navigate to a browser, paste the url, and append ?name=world

    TIP: Your url should look like this: http://localhost:7071/api/HttpTrigger1?name=world

  5. A response of "Hello world" is returned in the browser and you know your function worked!

  6. Select the "Detach" button to stop your project from running locally

    debug3

Deploy to Azure

  1. Sign in to your Azure Account by clicking "Sign in to Azure..." in the Azure Functions explorer

    If you don't already have an Azure Account, click "Create a Free Azure Account"

  2. Select the 'plus' button to open the "Create Resource" menu

    Create resource

  3. Choose "Create Function App in Azure..."

    Create Function App in Azure

  4. Enter a globally unique name for your Function App

  5. If multiple versions of your language's runtime are supported (i.e. Node.js 10 and Node.js 12), select your desired version (the latest is recommended)

  6. Select a location

  7. Wait for your Function App to be created. Progress will be shown in the Activity Log panel

    deploy2

  8. Once your Function App has been created, reveal the resource in the Resources view.

    Finished creating Function App

  9. Right click your Function App and select "Deploy to Function App"

    Deploy to Function App

  10. Once deployment is complete, expand your subscription in the Azure Functions explorer to copy your deployed function's url

    deploy3

  11. Navigate to a browser, paste the url, and append ?name=world

    TIP: Your url should look like this: https://<function app name>.azurewebsites.net/api/HttpTrigger1?name=world

  12. A response of "Hello world" is returned in the browser and you know your function worked!

Contributing

There are a couple of ways you can contribute to this repo:

  • Ideas, feature requests and bugs: We are open to all ideas and we want to get rid of bugs! Use the Issues section to either report a new issue, provide your ideas or contribute to existing threads.
  • Documentation: Found a typo or strangely worded sentences? Submit a PR!
  • Code: Contribute bug fixes, features or design changes:
    • Clone the repository locally and open in VS Code.
    • Run "Extensions: Show Recommended Extensions" from the command palette and install all extensions listed under "Workspace Recommendations"
    • Open the terminal (press CTRL+ `) and run npm install.
    • To build, press F1 and type in Tasks: Run Build Task.
    • Debug: press F5 to start debugging the extension.

Before we can accept your pull request you will need to sign a Contribution License Agreement. All you need to do is to submit a pull request, then the PR will get appropriately labelled (e.g. cla-required, cla-norequired, cla-signed, cla-already-signed). If you already signed the agreement we will continue with reviewing the PR, otherwise system will tell you how you can sign the CLA. Once you sign the CLA all future PR's will be labeled as cla-signed.

Code of Conduct

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.

Telemetry

VS Code collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. If you dont wish to send usage data to Microsoft, you can set the telemetry.enableTelemetry setting to false. Learn more in our FAQ.

Lifecycle

The Azure Functions extension for VS Code follows the Modern Lifecycle Policy. Follow instructions here to get the latest updates of the extension.

Support Dates

Version Start Date Retirement Date
1.x 10/20/2020 In Support

License

MIT