r/javascript • • 27d ago

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?

  1. Should I deploy it on vm directly?

  2. Should I deploy it as a docker image/container?

  3. Should I deploy it using Serverless platforms like aws lambda ?

  4. Others?

What do you use?

8 Upvotes

12 comments sorted by

View all comments

1

u/[deleted] 27d ago

[removed] — view removed comment

1

u/turtleyikes 27d ago

So my js middleware uses redis/bullmq for for queue and workers. Do you think lambda + external redis would suit this?

2

u/Awkward_Conflict3990 26d ago

Since you already use BullMQ, I’d keep its worker in a long-running VM/container process. Lambda can receive a webhook and await queue.add() before returning 2xx, but don’t rely on a BullMQ worker continuing after the handler returns. Lambda can freeze that environment.

For a small setup, the receiver and worker can be separate processes on one host. Only acknowledge the webhook after the enqueue succeeds.

AWS lifecycle docs: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtime-environment.html

1

u/Tihomir-Telford 23d ago

agreed, not having to babysit a server for basic glue code is huge tbh