Top tasks for JavaScript developers
Find an example of your current task. If you can't find a task, leave feedback requesting your task.
Active Directory App
Provide authentication.
AD App registration Documentation
| Task | using |
|---|---|
| Create app registration | Portal Azure CLI |
| Easy authentication | Static Web Apps Express.js |
| List app registration | Azure CLI |
MSAL Login/Logoff button using @azure/msal-browser |
React/TypeScript |
MSAL React using @azure/msal-browser passing user credentials to Function API |
React and Azure Function API |
MSAL Express.js using @azure/msal-node |
Express.js |
| Revoke Azure AD permission | https://myapplications.microsoft.com/ |
| Revoke Consumer permission | https://account.live.com/consent/manage |
Azure Resource Groups
| Task | using |
|---|---|
| Create resource group | Azure CLI TypeScript |
| Delete resource group | Azure CLI TypeScript |
| List resource groups | TypeScript |
Apps
Static Web Apps
| Task | using |
|---|---|
| Create React app targeting JavaScript language | Bash |
| Create Vue app | Bash |
| Create Static Web Apps | Visual Studio Code extension Azure CLI |
| Browse site | Visual Studio Code extension |
| Proxy SWA locally with SWA CLI | SWA CLI |
| Authenticate SWA locally with SWA CLI | SWA CLI |
| Set Static Web app local environment variables | Bash |
Function (serverless) apps
| Task | using |
|---|---|
| Create Functions app locally | Visual Studio Code extension |
| HTTP trigger code | JavaScript |
| Debug/test function locally | Visual Studio Code |
| Deploy function to Azure cloud | Visual Studio Code extension |
| Verify secure function API is available | Visual Studio Code extension/Browser |
| Remove function app resource | Visual Studio Code extension |
Cognitive Services
| Task | using |
|---|---|
| Create Cognitive Services ComputerVision resource | Azure CLI |
| Get Cognitive Services ComputerVision resource | Azure CLI |
| Install Azure SDK | Bash |
Analyze image with @azure/cognitiveservices-computervision |
Visual Studio Code |
Containers including Docker tasks
| Task | using |
|---|---|
| Add docker files to local project | Visual Studio Code extension |
| Build docker image from local project | Visual Studio Code extension |
| Create a container image from your local JavaScript project | Visual Studio Code |
| Create container registry resource | Visual Studio Code extension Azure CLI |
| Create Dockerfile | Visual Studio Code extension |
| Deploy image to app service | Visual Studio Code extension |
| Get Azure container registry credentials | Azure CLI |
| Login to container registry | BASH - Docker CLI |
| Push image to Docker registry resource | Visual Studio Code extension |
| Push image to Azure container registry resource | Visual Studio Code extension BASH - Docker CLI |
| Run local container | Visual Studio Code extension |
| Tag your local image | BASH - Docker CLI |
| Verify Docker version | Bash |
Databases
Cassandra API on Cosmos DB
| Task | Using |
|---|---|
| Create resource | Azure portal Azure CLI |
| Create keystore on resource | Azure CLI |
| Create table on keystore | Azure CLI |
| Get connection information | Azure CLI |
| Use cassandra-driver API on Cosmos DB | JavaScript |
MariaDB
| Task | Using |
|---|---|
| Create MariaDB resource | Azure portal Azure CLI @azure/arm-mariadb |
| Create MariaDB database on resource | Azure CLI |
| Get Connection string | Azure CLI |
| Use and view database | Azure Cloud Shell's mysql CLI MySQL Workbench Visual Studio Code extension npm mariadb JavaScript |
MongoDB API on Cosmos DB
| Task | using |
|---|---|
| Create Cosmos DB - MongoDB resource | Visual Studio Code extension Azure CLI |
| Get Cosmos DB connection string | Visual Studio Code extension Azure CLI |
| View Cosmos DB | Cosmos DB Explorer |
| Use Mongoose API for mongoDB on Cosmos DB | JavaScript |
MySQL
| Task | Using |
|---|---|
| Create resource | Azure portal Azure CLI @azure/arm-mysql |
| Create database on resource | Azure CLI |
| Get Connection string | Azure CLI |
| Use and view database | MySQL Workbench Visual Studio Code extension npm mysql npm promise-mysql |
| Use promise-mysql API | JavaScript |
PostgreSQL
| Task | using |
|---|---|
| Create resource | Visual Studio Code extension Azure CLI Azure portal @azure/arm-postgresql |
| Get connection string | Azure CLI |
| View DB | Visual Studio Code extension Azure Cloud Shell's psql |
| Use pg API for DB | JavaScript |
SQL API on Cosmos DB
- Service documentation
- @azure/cosmosdb npm package
| Task | using |
|---|---|
| Add firewall rule for your client IP address | Azure CLI |
| Create Cosmos DB - SQL API resource | Visual Studio Code extension Azure CLI |
| Get Cosmos DB keys | Azure CLI |
| Get Cosmos DB connection string | Visual Studio Code extension |
| View Cosmos DB | Cosmos DB Explorer |
| Use SQL API for on Cosmos DB | JavaScript |
GraphQL
| Task | using |
|---|---|
Deploy a Hello World GraphQL API as an Azure Function |
VSCode |
| Deploy CRUD operations in GraphQL API as an Azure Function | VSCode |
Deployment to hosting environment
| Task | using |
|---|---|
| Static Web App (SWA) | VS Code From Framework (Next.js) Azure Pipelines |
| Functions | VS Code Azure Pipelines GitHub Actions |
| App service | Express.js with VS Code Git Push GitHub Actions Azure DevOps |
Git
| Task | using |
|---|---|
| Create a local branch | Visual Studio Code with Command Palette |
| Clone project from GitHub to local computer | Visual Studio Code |
| Push a local branch to remote repo | Visual Studio Code |
GitHub
Actions
| Task | using |
|---|---|
| Add secrets | Visual Studio Code |
| View build process | GitHub website |
Key Vault
| Task | using |
|---|---|
| Get secrets | @azure/keyvault-secrets |
Monitoring
| Task | using |
|---|---|
| Create resource | Azure CLI |
Storage
| Task | using |
|---|---|
| Create resource | Visual Studio Code extension |
| Delete resource | Visual Studio Code extension |
| Create Storage container shared access signature (SAS) token | Portal |
| Set SAS token in code | TypeScript |
| Configure CORS for Storage | Portal |
| Use Azurite Storage emulator | Visual Studio Code |
Blobs
| Task | using |
|---|---|
Create container in storage with @azure/storage-blob |
React/TypeScript |
Upload file to storage with @azure/storage-blob |
React/TypeScript |
| Upload file to Storage with Function API | TypeScript with out binding |
Terminal usage
| Task | using |
|---|---|
| Integrated terminal | Visual Studio Code |
Virtual machines
| Task | using |
|---|---|
| Create - with cloud-init file | YAML |
| Create - with Azure CLI - linux VM resource | Azure CLI |
| Connect - Open port of linux VM | Azure CLI |
| Connect - with SSH | Bash |
| Get Status | @azure/arm-compute |
| List VMs | @azure/arm-compute |
| Stop VM | @azure/arm-compute |
| Start VM | @azure/arm-compute |
| Logs - Install Monitoring SDK | Bash |
| Logs - Add monitoring code to Express.js app | applicationinsights |
| View logs | Azure CLI Portal |
| Delete | @azure/arm-resources |
Visual Studio Code: Develop and debug JavaScript apps
| Task | using |
|---|---|
| Code completion | Visual Studio Code |
| Debugging local Node.js app | Visual Studio Code |
| Local full-stack debugging | Visual Studio Code |
| Navigate the project files and code | Visual Studio Code |
| Running the local Node.js app | Visual Studio Code |
Samples supporting these tasks
| Name | Description |
|---|---|
| React app with Function API | Locally build and deploy a React/TypeScript client application with an Azure Function API to an Azure Static Web App with a GitHub action. Tutorial - Sample code |
| React app using Cognitive Services | Locally build and deploy a React/TypeScript client application to an Azure Static Web App with a GitHub action. Tutorial - Sample code |
| React app uploading file to Azure Storage Blobs | This sample project is a TypeScript React (create-react-app) framework client app with an HTML form to select a file for upload to Azure Storage Blobs. Tutorial - Sample code |
| React app with login button | The SPA built in this tutorial is a React app (create-react-app) with the following tasks: * Login using a Microsoft-supported login such as Office 365 or Outlook.com * Log off from the application Tutorial |
| Azure Function app with MongoDB | The MongoDB database functionality includes: * Add item * Delete item by ID * Get item by ID * Get all items Tutorial - Sample code |
| Azure Function app upload file to Blob Storage | This article shows you how to create an Azure Function API, which uploads a file to Azure Storage using an out binding to move the file contents from the API to Storage. * Locally develop and run with Azurite Storage emulation and Azure Functions Core tools. * Deploy to Azure Functions with a Storage resource * Review logs in Application Insights Tutorial - Sample code |
| Azure Function app to manage resource groups | In this article series, you'll create an Azure Function app with APIs to manage Azure resource groups. Features and functionality of this article series: * Create local Azure Function app project in Visual Studio Code * Create function APIs boilerplate code in Visual Studio Code * Deploy to Azure Functions * Create service principal * Configure local and remote application settings * Use DefaultAzureCredential in both local and remote environments * Use Azure SDKs to use Azure Identity and Azure Resource Management APIs * Use your local and cloud APIs to create, delete, and list resource groups in your subscription. Article series - Sample code |
| Express.js app with MongoDB database | The tutorial demonstrates how to load and run the project locally with VSCode, using extensions, was well as how to run the code remotely on an App service. The tutorial includes creating a Cosmos DB resource for the Mongo API, getting the connection information and setting that in the app service configuration setting to connect to a cloud database. Tutorial - Sample code |
| Express.js app deployed to VM with cloud-init file | Create a Linux virtual machine (VM) for an Express.js app. The VM is configured with a cloud-init configuration file and includes NGINX and a GitHub repository for an Express.js app. Once the VM is running, you can connect to the VM with SSH, change the web app to including trace logging, and view the public Express.js server app in a web browser. Tutorial - Sample code |
| GraphQL serverless function | Hello world with TypeScript, ready to deploy to Azure Function. Sample code |
| GraphQL serverless CRUD function | CRUD operations with TypeScript, ready to deploy to Azure Function. Sample code |
| GraphQL static web app | Static web app with React client and Azure Function, both with shared TypeScript models demonstrating a Trivia game, with data held in Cosmos DB SQL API. Sample code |
Use the JavaScript end-to-end snippets collection, https://github.com/azure-samples/js-e2e, to find or submit JavaScript or TypeScript code examples.
Use the Azure Samples browser to find more samples supporting your specific use case.
Next steps
Maklum balas
Kirim dan lihat maklum balas untuk