What is Azure for JavaScript developers
Azure is a cloud platform providing a full range of hosting options and cloud-based services. If you're new to cloud development, learn more about Azure:
- Azure Architecture Center
- Azure terminology
- Ten design principles for Azure applications
- Cloud design patterns
JavaScript, TypeScript, and other languages
Azure runtime support for JavaScript also supports TypeScript or any other flavor that transpiles down to JavaScript.
Azure services
Azure cloud-based services provide a huge variety of features. These services can be used independently or as a collection.
Top service types for JavaScript developers include:
- Hosting
- Authentication and authorization
- Containers
- VMs
- Databases
- Storage
- Search
- Cognitive services
- Metrics and logging
- DevOps
1. Create Azure services in the Quickstart Center
When you begin learning the Azure cloud, create an account for free, then start in the Quickstart Center in the Azure portal.
Each service's page on the Azure portal includes connection information you'll need to access your resource outside of the portal.
Pricing tiers
Pricing tiers are how your resource is billed. Use the Azure pricing calculator to understand billing for your resource.
Free tier resources
When selecting the free (F0) pricing tier, it's important to understand limitations that come with that plan. When a free tier is offered:
- A subscription may be limited to one free resource of that service. If you can't create a free resource, that indicates the free resource already exists in your subscription.
- When you exceed the pricing tier quota, either in transactions per second (TPS), or transactions per month (TPM), your application receives an HTTP error with a message indicating you're out of quota.
2. Prepare your development environment
Your development environment needs a few tools to have the best development experience:
- Visual Studio Code and the Azure Tools extension
- Git
- Node.js - always use the Long-term support (LTS) version if possible.
- If you need to synchronize your local development runtime with your Azure hosted runtime (such as Azure App Service, Azure Functions, or Azure Static Web apps), use a runtime version management solution such as:
- Azure CLI to provide Azure resource creation and management.
- Local development hosting CLIs such as:
3. Use Azure SDK with JavaScript
To use Azure services programmatically with JavaScript, find the npm package specific to the service you'll use. Each npm package has service-specific connection information.
All Azure SDKs run with JavaScript without any other tooling. While most modern SDKs are written in TypeScript and provide the *.d.ts
file for type checking, TypeScript isn't a requirement to use the Azure SDKs or the Azure cloud services.
Your JavaScript code can use Azure services, regardless of where your code is hosted (local, hybrid, cloud). The recommended way to use Azure services programmatically with JavaScript is the Azure SDKs. These SDKs expect a minimum Node.js with Long-term support (LTS).
4. Verify runtime for JavaScript apps hosted in Azure
In order to host your JavaScript apps in an Azure hosting environment, make sure your local development environment Node.js runtime mimics the Azure hosting runtime you intend to use.
Azure App service uses the Node.js runtime engine. To show all supported Node.js versions, run the following command in the Cloud Shell:
az webapp list-runtimes | grep node
Azure Static Web App run times are only relevant to the Function APIs.
Azure Functions supported Node.js versions are based on which version of Functions you use.
Custom run times - a custom runtime is supported in the following ways:
- Virtual machines
- Containers - single, web app, Kubernetes
- (serverless) Functions - use custom handlers
5. Try a JavaScript quickstart for your hosting scenario
Hosting options allow you to quickly use Azure for your application. The following hosting quickstarts and tutorials guide you to the most common Azure first day experience:
- Front-end client with APIs using Azure Static Web apps
- Serverless APIs using Azure Functions
- Server application using Azure App Service
- Container application using Azure App Service
- Linux Virtual machine application using Azure Virtual Machines
Learn more about hosting options.
Next steps
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for