DEV Community

Barney
Barney

Posted on

Expose local server over SSL? (Messenger bot)

Hi!

In the past I've been working on a chatbot and now I want to continue development but I can't seem to find a solution to expose my local server over HTTPS. Facebook messenger API only works over HTTPS.

I've read some articles about ngrok but it recently changed plans so the free plan no longer works (no static address which makes development possible but uneasy).

Also I've found another service called serveo.net whichs looked promising but it seems like HTTPS is not supported.

Any suggestion?

Thanks!

Discussion (9)

Collapse
joshuatz profile image
Joshua Tzucker

The best option is definitely just paying for a service that lets you keep a reserved address (Ngrok, Pagekite, etc.), or running a self-hosted version on your own resource (VPS, Raspberry Pi, etc.). The last time I searched around for a truly "free" and all-in-one option, I came up short (Pagekite is paid BTW, but has a free trial period).

However, if you are desperate for a truly free solution, I actually came up with a workaround that I use with Ngrok; proxy requests to the dynamic Ngrok URL through a static Google Cloud Functions URL. This works, even on GCP's perpetual "free" tier. I've written up this approach here, and you can find the code here.

Collapse
sovietspy2 profile image
Barney Author

Nice hack! 👌

Collapse
jinoantony profile image
Jino Antony

You can use expose which is a free alternative to ngrok.

Collapse
sovietspy2 profile image
Barney Author

This is pretty cool, testing it out right now! Thanks!

Collapse
sovietspy2 profile image
Barney Author

This is good! Thanks for this!

Collapse
tienloinguyen22 profile image
sese22

Ngrok can help you achive this. Register an account for unlimited request or you will be restricted number of requests per minute

Collapse
memahesh profile image
Medam Mahesh

You can use Heroku, right.