A Java (Quarkus) application that shows example of how to use the Azure Web PubSub API
The example uses an instance of Azure Web PubSub service that you can create from Azure portal.
To work locally, you can execute this:
./mvnw compile quarkus:dev
/webpubsub
- GET /webpubsub/send/{text}
- GET /webpubsub/sendtoall
- GET /webpubsub/token
Or visit: http://localhost:8080 and choose an option from the menu.
Using the following command you can rebuild the image:
./mvnw package
docker build -f src/main/docker/Dockerfile.jvm -t rmarcello/azure-webpubsub-example .
I pushed the image on my docker hub and you can use it to play with it.
docker run -i --rm -p 8080:8080 -e webpubsub.accesskey=changeme -e webpubsub.endpoint=https://<RESOURCE_NAME>.webpubsub.azure.com rmarcello/azure-webpubsub-example