An online markdown blog and knowledge repository.
Subscriptions contain Resource Groups that contain Resources including instances of services e.g. Azure App Service.
Resource Group:
To Create A Resource Group, use:
Use the Azure tools to:
Note: From my workstation, the Azure Extension was very slow.
Express.js is a server-side app, so the following service plans would be appropriate:
App Service Plan defines the compute resources for the webapp to run on (an abstracted 'server farm').
One or more apps can be hosted within the same App Service Plan.
Resource-intensive apps should be moved into their own App Service Plan to avoid negative impacts on other apps in the same plan.
Required Configuration Items:
Note: It looks like Application Insights must be enabled at the Azure Portal.
const port = process.env.PORT || 8080;
WEBSITES_PORT 3000
SCM_DO_BUILD_DURING_DEPLOYMENT True
URL like: https://your-resource-name.azurewebsites.net/
Change 'hostingstart.html' static file to branding or contact information, as a splash page until the site is fully deployed.
Wide-open at initial deployment.
Post-deployment, configure to use social sign-ins, an AD authentication service, or a custom authentication platform.
Some programmatic changes within the App might be necessary to enable authentication and authorization.
Application Settings: Env Vars
Databases: Only populated if DB is created at same time as this App Service.
Deployments: List
Files: This is where hostingstart.html is stored. Other files will be stored here for this resource to use.
Logs: Running App Log Files.
WebJobs: Not available for Linux Apps.
Deployment Slots: Slots to expanding deployments to handle higher loads.
Recommendation is to allow Azure to install all NPM Packages:
SCM_DO_BUILD_DURING_DEPLOYMENT=true
Optional: Store custom NPM Packages in Azure Storage and install the modules from there.
Build process should run 'npm install'.
Optional: Consider using the npm script 'postinstall' to run more build tasks for the app.
Post-deployment tasks to consider:
This can be done in Azure Portal or via VS Code.
Use Azure SSH or bash in-browser portals or VS Code 'files' to remove or add files to an existing deployemnt.
If in a paid Subscription and Tier, Slots can be used to Blue-Green deploy in real time including reversing deployments and showingn temporary messages to site visitors.
VS Code can deploy a local folder to an App Service. This uses a ZIP file to package files for transport.
Zip Deploy actions include:
/home/site/wwwroot/
GitHub can be used as a deployment source.
Integrated with App Service.
Provides monitoring data for Applications, Containers, VMs, and "Monitoring Solutions".
Can be integrated with Power BI.
Metric Analytics and Log Analytics are available.
Alerts and Autoscale configurations can be triggered from Azure Monitor.
Can integrate with Logic Apps and Export APIs.
Quotas are also available for CPU, RAM, Bandwidth, and Storage.
Logs available for:
Use .traceTrace()
method to leverage this within the application code.
See subsection "Custom Application Insights Logging" from the learn.microsoft.com module for sample code.
Review 'package.json', 'start' script line for DEBUG setting. Express.js and Node.js support 'DEBUG' variable as a was to enable debug logging in the Web App.
Settings > Application Insights > View APplication Insights Data > Investigate > Failures
Right click your Web App in the Azure Extension and select "Browse App" to launch a Web Browser directly to your deployed app.
Restart the WebApp by right-clicking the App Service resource and select "Restart".
Deploy a Node.js and MongoDB Web App to Azure.
MSFT Azure NodeJS Server Samples Repository.
Return to conted index
Return to ROOT README