Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jsturtevant/azure-event-grid-nodejs
https://github.com/jsturtevant/azure-event-grid-nodejs
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jsturtevant/azure-event-grid-nodejs
- Owner: jsturtevant
- License: mit
- Created: 2017-12-01T20:37:51.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-01T20:47:02.000Z (about 7 years ago)
- Last Synced: 2024-11-27T13:44:14.664Z (2 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Azure Event Grid Node.js
Sample to show how to register a Node.js endpoint with eventgrid.
## Try it out
There is a full walk through at http://www.jamessturtevant.com/posts/Validating-Azure-Event-Grid-WebHook-in-Nodejs```bash
# create a topic
az group create --name eventgridrg
az eventgrid topic create --name nodejs -l westus2 -g eventgridrg# register your https endpoint with Event Grid (can use ngrok for local testing)
az eventgrid topic event-subscription create --name expressapp \
--endpoint https://yoururl/event \
-g eventgridrg \
--topic-name nodejs# send test event
endpoint=$(az eventgrid topic show --name nodejs -g eventgridrg --query "endpoint" --output tsv)
key=$(az eventgrid topic key list --name nodejs -g eventgridrg --query "key1" --output tsv)# use the example event from docs
body=$(eval echo "'$(curl https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/event-grid/customevent.json)'")# post the sample event
curl -X POST -H "aeg-sas-key: $key" -d "$body" $endpoint
```