@azure/web-pubsub-client-protobuf 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,64 @@
1
+ # Web PubSub client protobuf protocol library for JavaScript
2
+
3
+ [Azure Web PubSub](https://aka.ms/awps/doc) is a cloud service that helps developers easily build real-time features in web applications with publish-subscribe patterns at scale.
4
+
5
+ You can use this library to add protobuf subprotocols including `protobuf.reliable.webpubsub.azure.v1` and `protobuf.webpubsub.azure.v1` support to `@azure/web-pubsub-client` library.
6
+
7
+
8
+ ## Getting started
9
+
10
+ ### Currently supported environments
11
+
12
+ - [LTS versions of Node.js](https://nodejs.org/about/releases/)
13
+
14
+ ### Prerequisites
15
+
16
+ - An [Azure subscription][azure_sub]
17
+ - A [Web PubSub resource][create_instance]
18
+
19
+ ### 1. Install the `@azure/web-pubsub-client-protobuf` package
20
+
21
+ ```bash
22
+ npm install @azure/web-pubsub-client-protobuf
23
+ ```
24
+
25
+ ### 2. Use Protobuf protocols
26
+
27
+ ```javascript
28
+ let client = new WebPubSubClient("client-access-url", { protocol: WebPubSubProtobufReliableProtocol() });
29
+ ```
30
+
31
+ ## Troubleshooting
32
+
33
+ - ### Enable logs
34
+
35
+ You can set the following environment variable to get the debug logs when using this library.
36
+
37
+ ```bash
38
+ export AZURE_LOG_LEVEL=verbose
39
+ ```
40
+
41
+ For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
42
+
43
+ - ### Live Trace
44
+
45
+ Use [Live Trace tool][live_trace] from Web PubSub portal to view the live traffic.
46
+ ---
47
+ ## Additional resources
48
+ - Learn more about client permission, see [permissions](https://learn.microsoft.com/azure/azure-web-pubsub/reference-json-reliable-webpubsub-subprotocol#permissions)
49
+
50
+ - [Server SDK - JavaScript documentation](https://aka.ms/awps/sdk/js)
51
+ - [Product documentation](https://aka.ms/awps/doc)
52
+ - [Samples][samples_ref]
53
+
54
+ ---
55
+ ## Contributing
56
+
57
+ If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
58
+
59
+
60
+ [azure_sub]: https://azure.microsoft.com/free/
61
+ [samples_ref]: https://github.com/Azure/azure-webpubsub/tree/main/samples/javascript/
62
+ [create_instance]: https://learn.microsoft.com/azure/azure-web-pubsub/howto-develop-create-instance
63
+ [npm]: https://www.npmjs.com/package/@azure/web-pubsub-client
64
+ [live_trace]: https://learn.microsoft.com/azure/azure-web-pubsub/howto-troubleshoot-resource-logs