Add basic support for registration and handling of Shopify webhook
notifications, as a starter example.
Key pieces:
registerWebhook function in lib/shopify.js registers a webhook
via the admin API; creates a new registration or updates an
existing one as appropriate
add endpoint /api/shopify/webhook/TOPIC/ that receives, verifies,
and prints to console the content of webhook notifications
register the app/uninstalled webhook after initial auth, like
the original example Shopify project
Also includes an endpoint /api/shopify/register-webhooks you can
hit manually from within the Shopify Admin 1 to register webhooks,
as a convenience to add or update webhooks since the after-auth hook
is rarely triggered (unlike in the original Shopify example)
Add basic support for registration and handling of Shopify webhook notifications, as a starter example.
Key pieces:
registerWebhook
function in lib/shopify.js registers a webhook via the admin API; creates a new registration or updates an existing one as appropriateapp/uninstalled
webhook after initial auth, like the original example Shopify projectAlso includes an endpoint /api/shopify/register-webhooks you can hit manually from within the Shopify Admin 1 to register webhooks, as a convenience to add or update webhooks since the after-auth hook is rarely triggered (unlike in the original Shopify example)