This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
This project is used as a template package for the Azure SDK for JavaScript. It is intended to help Azure SDK developers bootstrap new packages, and it provides an example of how to organize the code and documentation of a client library for an Azure service.
See oursupport policy for more details.
Usually you'd put a shell command for provisioning the necessary Azure services here.
@azure/template
packageInstall the Template client library for JavaScript withnpm
:
npm install @azure/template
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to ourbundling documentation.
You need to set upCross-Origin Resource Sharing (CORS) rules for your storage account if you need to develop for browsers. Go to Azure portal and Azure Storage Explorer, find your storage account, create new CORS rules for blob/queue/file/table service(s).
For example, you can create the following CORS settings for debugging. But please customize the settings carefully according to your requirements in a production environment.
Top-level examples usually include things like creating and authenticating the main Client. If your service supports multiple means of authenticating (e.g. key-based and Azure Active Directory) you can give a separate example of each.
Describe your primary client here. Talk about what operations it can do and when a developer would want to use it.
Create a section for each top-level service concept you want to explain.
Create several code examples for how someone would use your library to accomplish a common task with the service.
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set theAZURE_LOG_LEVEL
environment variable toinfo
. Alternatively, logging can be enabled at runtime by callingsetLogLevel
in the@azure/logger
:
const { setLogLevel } = require("@azure/logger");setLogLevel("info");
For more detailed instructions on how to enable logs, you can look at the@azure/logger package docs.
Please take a look at thesamples directory for detailed examples that demonstrate how to use the client libraries.
If you'd like to contribute to this library, please read thecontributing guide to learn more about how to build and test the code.
Was this page helpful?
Was this page helpful?