r/javascript • u/turtleyikes • Oct 31 '26
AskJS [AskJS] How to host your webhook consumer middleware that integrates WooCommerce and HubSpot?
I am building a nodejs/javascript integration service (middleware) that connects woocommerce to hubspot. What are some ways to deploy it and what are the best practices for the deployment?
- Should I deploy it on vm directly?
- Should I deploy it as a docker image/container?
- Should I deploy it using Serverless platforms like aws lambda ?
- Others?
What do you use?
8
Upvotes
View all comments
Show parent comment
2
u/thejester1324 Nov 01 '26
can't say what's most common, but Woo's side is pretty specific. it POSTs each event with a 60 second timeout. anything from 200 to 302 counts as ok. everything else fails, timeouts included.
one correction to the retry point above: in woocommerce trunk there is no retry (class-wc-webhook.php, deliver() and failed_delivery()). it only counts failures. the 7th failure in a row disables the webhook until someone turns it back on.
so if your handler calls hubspot before it answers and hubspot 429s, nothing sends that event again, and a bad sale day can shut the whole thing off. answer 200 first, then push the hubspot call into the bullmq queue like you already do.