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
- Databases
- Storage
- Search
- AI and Cognitive services
- Security
- DevOps
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, this may indicate the free resource already exists in your subscription.
- A pricing tier determines transactions per second (TPS), or transactions per month (TPM). When you exceed the pricing tier quota, your application receives an HTTP error with a message indicating you're out of quota. If you anticipate this issue for your application and Azure services, create several resources and host them behind a single endpoint.
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:
- Development Containers: Use a container with a specific Node.js version. You can manage the version of Node.js across several environments using containers. Visual Studio Code's Remote - Containers extension simplifies this process.
- Azure CLI to provide Azure resource creation and management.
- Local development hosting CLIs such as:
Use Azure client libraries 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 client libraries 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 client libraries 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 client libraries. These libraries expect a minimum Node.js with Long-term support (LTS).
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
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 Container Apps