After implementing your business logic, we recommend deploying your website to the cloud. Deploying your website to the cloud allows people to view your website by visiting a URL.
One way to deploy is using Azure App Service. This service will allow you to deploy and scale web, mobile and API apps.
Note: Make sure that the Web Template Studio and Azure App Service extensions are installed in Visual Studio Code.
The easiest way to deploy an application generated with Web Template Studio is to use the Web Template Studio: Deploy Web App
command. To execute this command, follow these steps:
-
Open the application generated with Web Template Studio in Visual Studio Code.
-
Press
Ctrl + Shift ⇧ + P
(Windows/Linux) orCommand ⌘ + Shift ⇧ + P
(Mac) to open the Command Palette. -
In the Command Palette, type
Web Template Studio: Deploy Web App
and pressEnter
to launch the deploy.
Web Template Studio will begin preparing the application for deployment. You can see the progress in the Visual Studio Code output. In addition, a notification will be launched for each step executed.
It will run the tasks to install all the necessary dependencies for the frontend and the backend apps.
Create a Production Build: This step will creates a publish directory with a production build of your frontend and backend apps.
This folder will contain all the necessary frontend and backend files for the deployment.
Web Template Studio will then automatically launch the command Azure App Service: Deploy to Web App...
, which will be in charge of deploying the application to an Azure App Service.
-
If you have added an Azure App Service when creating your application with Web Template Studio, the application already has a deployment configuration, so it will use the created Azure App Service.
-
Otherwise, the Azure App Service extension will ask you for the configuration settings to create a new Azure App Service:
- The folder that contains the app to deploy to the App Service. Select the
publish
folder for deployment to be successful. - Select
Create New Web App...
- Enter your web app name
- Select Linux as your OS
- Select Node.js 12 LTS for a Node/Express application, Python 3.7 for a Flask application or .Net Core Latest runtime for ASP .NET application.
- The folder that contains the app to deploy to the App Service. Select the
Start the application deployment to Azure App Service. We can see the progress of the deployment in the output of the Azure App Service extension.
At the end of the deployment, Visual Studio Code shows us a notification that the deployment has been successful.