hookdeck / hookdeck-cli

Alternative to ngrok for localhost asynchronous web development (e.g. webhooks). No account required.
https://hookdeck.com?ref=github-hookdeck-cli
Apache License 2.0
260 stars 9 forks source link

Add ability to listen to multiple sources at once with the CLI #70

Open leggetter opened 4 months ago

leggetter commented 4 months ago

How

  1. Add the * select to the listen command. Right now you can do hookdeck listen 9001 shopify which starts the CLI without a source select prompt for the source specified. With hookdeck listen 9001 * we could let you select all sources
  2. Support comma delimited source selector. Same as #1 but hookdeck listen 9001 shopify,stripe to start on a set of sources
  3. On hookdeck listen 9001 the source select prompt should have a “all” option which has the same behavior as *

image

  1. When the CLI starts, the terminal printout should support multiple sources & URL. The terminal should probably only print the first ~10. The connection name also needs to display the full name with the source prefix like shopify -> out-of-stock

image

The backend should already support this as only a set of connection IDs are expected

Caveat & questions

They * could cause problem if there are thousands of sources, should we put a upper bound of the first 100 as a limitation?

leggetter commented 4 months ago

They * could cause problem if there are thousands of sources, should we put a upper bound of the first 100 as a limitation?

Yes, let's add a limitation.

alexluong commented 4 months ago

@leggetter do we want to support the case where events from different connections / destinations are routed to different ports?

leggetter commented 4 months ago

@leggetter do we want to support the case where events from different connections / destinations are routed to different ports?

For now, no. I think it's fine to expect a new process to be spun up to send events to different ports.