Skip to content

Commit 729bb5d

Browse files
Merge pull request #6754 from diberry/diberry/0106-freshness-deployment
JS - 360244 - Freshness - Deployment options
2 parents f302c5f + 01fb838 commit 729bb5d

File tree

1 file changed

+54
-18
lines changed

1 file changed

+54
-18
lines changed
+54-18
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,75 @@
11
---
2-
title: Deployment options for Azure hosting
3-
description: Deploying your apps to Azure hosting services means moving a file or set of files to Azure to be served via an HTTP endpoint.
4-
ms.topic: how-to
5-
ms.date: 08/31/2022
2+
title: Deploy JavaScript apps on Azure
3+
description: Deploying your JavaScript applications to Azure allows you to use the power of cloud computing, ensuring scalability, reliability, and global reach. This guide walks you through various methods to deploy your JavaScript apps to Azure, from manual deployments to automated CI/CD pipelines.
4+
ms.topic: concept-article
5+
ms.date: 01/06/2025
66
ms.custom: vscode-azure-extension-update-completed
7+
#customer intent: As a JavaScript developer new to Azure, I want know all the ways to deploy code to Azure so that I can choose the best process for my application and situation.
78
---
89

9-
# Deployment choices for your web app to Azure
10+
# Deployment JavaScript app to Azure overview
1011

11-
Deploying your apps to Azure hosting services means moving a file or set of files to Azure to be served via an HTTP endpoint.
12+
To deploy your JavaScript-based app to Azure, you move a file or set of files to Azure to be served via an HTTP endpoint. The process of moving the files is called deployment.
1213

13-
Common methods of moving files to the Azure cloud include:
14+
## Prerequisites
15+
16+
* Azure subscription - [create one for free](https://azure.microsoft.com/free/ai-services?azure-portal=true).
17+
* [Node.js LTS](https://nodejs.org/).
18+
* A GitHub account if you plan to deploy from a GitHub repository.
19+
20+
## Deployment methods
21+
22+
Azure offers various deployment methods to suit different needs. Here are some common methods:
1423

1524
| Method | Details |
1625
|--|--|
17-
|[GitHub Actions](/azure/app-service/deploy-github-actions?tabs=applevel)|Use this for automated or triggered continuous deployments.|
18-
|[Visual Studio Code Extensions](https://marketplace.visualstudio.com/search?term=azure&target=VSCode&category=All%20categories&sortBy=Relevance)|Use this for manual, testing, or seldom deployments. Requires that you have the extension for the service installed locally.|
19-
|[Azure CLI](/azure/app-service/tutorial-nodejs-mongodb-app?tabs=azure-portal%2Cterminal-bash%2Cvscode-deploy%2Cdeploy-instructions-azportal%2Cdeploy-zip-linux-mac%2Cdeploy-instructions--zip-azcli)|Use this for manual or seldom deployments. Requires that you have the extension for the service installed locally.|
26+
|[Azure Developer CLI](/azure/developer/azure-developer-cli)|Ideal for developers who prefer command-line tools and need to automate the provisioning and deployment of resources.|
27+
|[Visual Studio Code Extensions](https://marketplace.visualstudio.com/search?term=azure&target=VSCode&category=All%20categories&sortBy=Relevance)|Suitable for manual, testing, or infrequent deployments. Requires the relevant Azure extensions installed locally.|
28+
|[Azure CLI](/azure/app-service/tutorial-nodejs-mongodb-app?tabs=azure-portal%2Cterminal-bash%2Cvscode-deploy%2Cdeploy-instructions-azportal%2Cdeploy-zip-linux-mac%2Cdeploy-instructions--zip-azcli)|Useful for manual or occasional deployments. Requires the Azure CLI installed locally.|
29+
|[GitHub Actions](/azure/app-service/deploy-github-actions?tabs=applevel)|Best for automated or continuous deployments triggered by changes in your GitHub repository.|
2030

21-
Other deployment methods may exist, based on the specific service. For example, Azure app service supports a wide variety of deployment methods:
31+
Other deployment methods exist, based on the specific service. For example, Azure app service supports a wide variety of deployment methods:
2232
* [From ZIP file](/azure/app-service/deploy-zip)
2333
* [With FTP](/azure/app-service/deploy-ftp)
2434
* [Dropbox or OneDrive](/azure/app-service/deploy-content-sync)
2535
* [Local Git](/azure/app-service/deploy-local-git)
2636
* [cURL](/azure/app-service/deploy-zip#with-curl)
2737
* [SSH](/azure/app-service/configure-linux-open-ssh-session)
2838

29-
You can redeploy to your App service using any of the provided methods even if you didn't use that method to originally deploy. You may have some configuration before redeploying if you are switching methods.
39+
You can redeploy to your App service using any of the provided methods even if you didn't use that method to originally deploy. You may have some configuration before redeploying if you're switching methods.
3040

3141
<a name="deploy-or-redeploy-to-app-service-with-visual-studio-code"></a>
3242

43+
## Build steps
44+
45+
Depending on your application's complexity and deployment needs, you can choose to build your JavaScript app either before or during deployment:
46+
47+
* **Build before deployment**: For complex or lengthy builds, package your application into a zip file and deploy it. A deployment package allows you to control and test the build before deployment.
48+
* **Build during deployment**: For simpler builds, use the Azure-provided environment variable SCM_DO_BUILD_DURING_DEPLOYMENT=true to build your app during deployment.
49+
3350
## Deployment slots
3451

35-
Use [deployment slots](/azure/app-service/deploy-staging-slots) to deploy your source code to a staging environment and warm up the environment before deploying to your production slot.
52+
[Deployment slots](/azure/app-service/deploy-staging-slots) in Azure App Service allow you to create separate environments for staging and production. The use of slots enables you to test your app in a staging environment before swapping it with the production slot, ensuring a smooth and error-free deployment. Learn more about deployment slots.
53+
54+
Don't use deployment slots to mix deployment purposes. All deployment slots share the app service so you need to make sure the traffic patterns and intended use of all slots are the same. If you need to have a hosted test or stage environment that should be a separate app service.
55+
56+
## Deploy with Azure Developer CLI
57+
58+
The Azure Developer CLI (azd) simplifies the process of deploying your app to Azure. Follow these steps:
59+
60+
1. [Install](/azure/developer/azure-developer-cli/install-azd) the Azure Developer CLI.
61+
1. [Find an existing project](https://azure.github.io/awesome-azd/) which uses many of the same resources your project uses.
62+
1. Initialize a local version of the project for use as an infrastructure template for your own project.
63+
64+
```bash
65+
azd init --template <template-name>
66+
```
67+
68+
1. Create the resources and deploy the code to Azure.
3669

37-
Do not use deployment slots to mix deployment purposes. All deployment slots share the app service so you need to make sure the traffic patterns and intended use of all slots are the same. If you need to have a hosted test or stage environment, that should be a separate app service.
70+
```bash
71+
azd up
72+
```
3873

3974
## Deploy with Visual Studio Code
4075

@@ -43,9 +78,9 @@ To deploy or redeploy your App service app with Visual Studio Code, complete the
4378
1. Install the related Azure extensions, for example [AzureApp Service](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureappservice) or [Azure Functions](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions).
4479
1. Open the Azure explorer. Select the Azure icon in the primary side bar or use the keyboard shortcut (<kbd>Shift</kbd> + <kbd>Alt</kbd> + <kbd>A</kbd>).
4580
1. In the Resources group, select your subscription and service.
46-
1. Right-click your service then select **Deploy to Web App...**.
81+
1. Right-click your service then select **Deploy to Web App...**.
4782

48-
:::image type="content" source="../media/azure-app-service-vscode-extensions/deploy-or-redeploy-app-service.png" alt-text="Deploy or redeploy to App service with Visual Studio Code":::
83+
:::image type="content" source="../media/azure-app-service-vscode-extensions/deploy-or-redeploy-app-service.png" alt-text="Deploy or redeploy to App service with Visual Studio Code":::
4984

5085
## Connect to your Azure hosted environment
5186

@@ -54,7 +89,7 @@ To deploy or redeploy your App service app with Visual Studio Code, complete the
5489

5590
## View files in Azure hosted environment
5691

57-
There are several ways to immediately see the files in your hosted Azure Web app or Function app. If you are using slots in your hosted resource, you need to make sure you are on the correct slot before viewing files.
92+
There are several ways to immediately see the files in your hosted Azure Web app or Function app. If you're using slots in your hosted resource, you need to make sure you are on the correct slot before viewing files.
5893
5994
* View files in [Azure portal](https://portal.azure.com) - select **Console** under Development tools for your hosting resource.
6095
@@ -72,6 +107,7 @@ View your HTTP endpoint from the service's Overview page on the Azure portal.
72107

73108
:::image type="content" source="../media/howto-deploy/azure-portal-hosting-url.png" alt-text="View your HTTP endpoint from the service's Overview page on the Azure portal.":::
74109

75-
## Next steps
110+
## Related content
76111

77112
* [Deployment tutorials using Visual Studio Code](https://code.visualstudio.com/docs/azure/deployment)
113+
* [Hosting apps on Azure](/azure/developer/intro/hosting-apps-on-azure)

0 commit comments

Comments
 (0)