Hacker News new | ask | show | jobs
by nickjj 2420 days ago
This looks really good.

It sounds like you won't have to configure tools like ngrok anymore to accept webhooks on a local connection. That's a huge win because with the free version of ngrok your subdomain would change a lot which means having to goto the Stripe dashboard to update it there. It was pretty tedious.

4 comments

This is a free equivalent to ngrok and it only uses SSH - https://serveo.net/ - and it accepts custom subdomains. I spin it up for each project like this with $DOMAIN and $PORT being defined/fixed for each project and the connection kept open permanently using autossh:

     ssh -R $DOMAIN:80:localhost:$PORT serveo.net
There are API endpoints for creating, listing and deleting webhooks in Stripe now too - my test suites and dev instances purge any existing webhooks and create a new one each run.

https://stripe.com/docs/api/webhook_endpoints/create

Do you think there would be demand for `serveo` but instead of running your project locally, you point to a Dockerfile and the entire container + all of its dependencies are ran remotely (with wildcard subdomain SSL included)?

I was going to test the waters with https://www.dollardeploys.com/ (not functional yet), wasn't sure how to differentiate it between ngrok/serveo.

I think at that point you're really into Heroku's territory rather than ngrok/serveo. Their free dynos might be hard to compete with, you can push a git commit or docker image or automatically deploy upon repo changes:

https://devcenter.heroku.com/categories/deploying-with-docke...

I 100% agree which is why I decided not to pursue the idea. Thank you very much for taking the time to provide feedback!
I've started using `serveo.net` to monitor my internet uptime (Raspberry Pi with a simple webserver, [updown.io](https://updown.io) to request it via [serveo.net](https://serveo.net)) but they were unavailable/offline for ~4 days within the last 10 days.
Currently offline due to phishing.

     Serveo is temporarily disabled due to phishing.

     Serveo will return in a few days with a few new 
     restrictions to help dissuade abuse. Thanks for your patience!
The message is new, usually the website was also down, but this probably explains why.
That's why i switched from ngrok to localtunnel (global npm package) https://www.npmjs.com/package/localtunnel

You can just run lt -p 8080 --subdomain whateveryouwant ;)

Yes setting up all that stuff was one of the most painful things about local development working with Stripe webhooks. This is a good solution.
I still prefer to setup ngrok because it allows me to view and replay requests. If the stripe cli supported that, then I'd move to use the cli entirely
On the listen side, you can run `stripe listen --print-json` which will output the entire object.

You can also resend events by doing `stripe events resend <event_id>`.

We'll see about documenting both better!

Yeah that's true, another upside to ngrok is it works for not just Stripe. Sometimes you need to link up with multiple payment gateways and listen for webhooks from 1 of them at a time.