Getting started - Managing Network using Azure JavaScript/TypeScript SDK
These code samples will show you how to manage Network using Azure SDK for JavaScript/TypeScript.
Features
This project framework provides examples for the following services:
Network
- Using the Azure SDK for JavaScript/TypeScript - Network Manamgement Library @azure/arm-network for the Virtual Network API, Virtual WAN API, Network Wather API, Network Gateway API, Firewall API, ExpressRoute API
Installation
Before using the sdk package,we need install nodejs and add it into environment variables.
reference :
nodejs version: >=22 typescript version: 5.9.3
Quickstart
Clone the repository.
git clone https://github.com/Azure-Samples/azure-samples-js-managementInstall the dependencies using npm.
cd azure-samples-js-management/samples/network npm i -g typescript npm install
Demo
A demo app is included to show how to use the project.
To run the complete demo, you need to call the methods you want to test in main method.
```
async function main() {
client = new NetworkManagementClient(credential, subscriptionId);
await virtualNetworks_beginCreateOrUpdateAndWait();
}
```
execute below command on terminal
```
tsc network_base_example.ts (it will create a same name js file)
node network_base_example.js
```