DEV Community

Cover image for How I built a free WhatsApp dev tunnel (no ngrok) and a self-healing loop in Node.js
Denis
Denis

Posted on

How I built a free WhatsApp dev tunnel (no ngrok) and a self-healing loop in Node.js

Hey everyone,

I've been working on a Node.js project called Pixel Office (a multi-agent assistant that runs over WhatsApp). While building it, my dev team ran into a few bottlenecks during local testing and deployment, so we built some custom utilities to solve them.

Since they turned out to be super useful, we decided to bundle them and open-source the repository today. Here’s a breakdown of the three dev tools we integrated:

1. Local Webhook Tunnel (No ngrok)

Testing WhatsApp webhooks locally usually requires setting up ngrok, which has become increasingly restrictive on free tiers, or configuring firewall rules.

To bypass this, we built a simple Socket.io proxy in our Express backend. When Meta sends a webhook targeting a developer's phone, the server intercepts it and streams the JSON payload over WebSocket directly to a local CLI client.

You just run this locally:


bash
node bin/tunnel-cli.js --port 3000 --key YOUR_API_KEY
Enter fullscreen mode Exit fullscreen mode

Top comments (0)