<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by David Tang on Medium]]></title>
        <description><![CDATA[Stories by David Tang on Medium]]></description>
        <link>https://medium.com/@dtangdev?source=rss-650d45ec64a8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5a2yj1F58UJYSty5upRiSw.jpeg</url>
            <title>Stories by David Tang on Medium</title>
            <link>https://medium.com/@dtangdev?source=rss-650d45ec64a8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 00:51:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dtangdev/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Expose: An Alternative to ngrok]]></title>
            <link>https://medium.com/yield-studio/expose-an-alternative-to-ngrok-96bea1c36187?source=rss-650d45ec64a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/96bea1c36187</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[expose]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[ngrok]]></category>
            <dc:creator><![CDATA[David Tang]]></dc:creator>
            <pubDate>Wed, 15 Jan 2025 11:18:06 GMT</pubDate>
            <atom:updated>2025-01-15T15:00:00.532Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L_BYwIBiv4CqGSGXN9EK1A.png" /></figure><p>Expose is a tool designed to expose local services to the outside world. It was developed in PHP by Beyond Code.</p><p>Unlike ngrok, Expose is an open-source solution that can be self-hosted.</p><p>This provides greater control over the server and traffic.</p><h3><strong>In What Cases Can We Use Expose?</strong></h3><p>It can be useful for the following scenarios:</p><p>— <strong>Debugging During Mobile App Development</strong></p><p>When developing a mobile application, we sometimes need to test a build of our app on app stores. <br>Since our app cannot access our local API, we must open access to test our features, especially on a staging build, if an adequate environment is not yet available in the early stages.</p><p>— <strong>Simplifying Webhook Setup</strong></p><p>Who hasn’t implemented a banking service before? <br>Sometimes, we need to create a webhook accessible by the banking service to retrieve response codes after a payment test and update our test orders.</p><p>And what about an authentication system with Facebook or Google? <br>You can configure a Callback URL using the Expose URL to test authentication.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rFqglWoqFJ_udXWTV1AB_A.png" /></figure><p>— <strong>Showcasing a Project Under Development</strong></p><p>To demonstrate the project to a client during a demo or to allow them to quickly test a proof of concept (POC).</p><h3>Installation</h3><p>Expose is easy to install; all you need is a server that supports PHP 7.2 and Composer.</p><blockquote>bash composer global require beyondcode/expose</blockquote><p>Ensure that Composer’s bin folder is included in your PATH (you can add this line to the end of your .bashrc based on the location of your Composer files).</p><blockquote>export PATH=”$PATH:$HOME/.composer/vendor/bin:$PATH”<br>or <br>export PATH=”$PATH:$HOME/.config/composer/vendor/bin”</blockquote><p>Alternatively, you can install it directly via the executable:</p><blockquote>curl <a href="https://github.com/beyondcode/expose/raw/master/builds/expose">https://github.com/beyondcode/expose/raw/master/builds/expose</a> -L — output expose</blockquote><blockquote>chmod +x expose</blockquote><blockquote>./expose</blockquote><h3><strong>Usage</strong></h3><h4>Using the Expose Server</h4><p>First, create an account at <a href="https://expose.dev/">https://expose.dev</a>.<br>You will receive a token that you need to activate:</p><blockquote>expose token &lt;mytoken&gt;</blockquote><p>You can then start a tunnel on the desired port with the following command:</p><blockquote>expose share <a href="http://mysite.test/">http://mysite.test</a></blockquote><p>Expose generates a public URL accessible externally.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yjlItTkpO3FCsBiQRq-PWQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9qNKB0ab1fqL3oqdhWstSA.png" /></figure><p>You also have access to a dashboard to view HTTP requests at <a href="http://127.0.0.1:4040.">http://127.0.0.1:4040.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*y5HznUpww7Oa8GZtJP8jtw.png" /></figure><p>Currently, usage is similar to ngrok. <br>However, let’s leverage Expose by self-hosting the solution.</p><h3>Setting Up Self-Hosting</h3><p>Prerequisites:</p><ul><li>PHP 8.1</li><li>sqlite3 extension</li><li>Install Expose as described earlier (this installs both the client and the server).</li></ul><p>To launch the Expose server, use a single command:</p><blockquote>expose serve mydomainname.com<br>- “ on server”</blockquote><p>For example, on my server, I run the following command:</p><blockquote>expose serve mydomainname.com — port=3000<br>- “ on server”</blockquote><p>The port argument allows you to specify a port different from the default <strong>8080</strong>.<br>Don’t forget to open the port in TCP on your server.</p><p>Now, I have an operational Expose tunnel!</p><p>You’ll need to configure the Expose client on your machine to use your server.<br>To do this, modify the file ~/.expose/config.php and add your server information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QDCnI1i7c0gGCd3BRNetvg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8RmHxpfxHStXcEvVOzsDXQ.png" /></figure><p>You can also modify other parameters in this file. Refer to the official documentation at <a href="https://expose.dev/docs/server/starting-the-server">https://expose.dev/docs/server/starting-the-server</a>.</p><p>Re-execute the command:</p><blockquote>expose share <a href="http://mysite.test/">http://mysite.test</a><br>- “ on local”</blockquote><p>Your local site is now exposed !</p><h3>Advantages Over ngrok</h3><p>When using ngrok, the inability to use custom URLs can become an issue, especially if you need to deploy a new version of your application to update the URL. Furthermore, the free version of ngrok imposes limitations like URL expiry.</p><p>By self-hosting your own instance of Expose, you eliminate all imposed limits:</p><ul><li>Request limits (20,000 per month).</li><li>Rate limits (4,000 requests per minute).</li><li>Data limits (1 GB in ngrok’s free version).</li></ul><h3>Pricing</h3><p>ngrok offers three versions:</p><ul><li>Personal: $8/dev/month, or $96 annually.</li><li>Pro: $20/dev/month, or $240 annually.</li><li>Enterprise: $39/dev/month, or $468 annually.</li></ul><p>Expose offers the following annual pricing:</p><ul><li>Pro: $59/dev/year.</li><li>Business: $499/dev/year.</li><li>Enterprise: Custom pricing.</li></ul><p>Choose your plan based on your needs. If your requirements are basic, ngrok’s personal plan may suffice.</p><h3>Conclusion</h3><p>Expose is a great open-source alternative to ngrok, reducing dependency on a single provider and allowing you to compare the two based on your needs.</p><p>It offers full control through self-hosting, without the limitations imposed by ngrok (requests, data rate, etc.). Additionally, Expose’s annual costs are more competitive, though ngrok’s basic version may suffice for limited needs.</p><h3>Going Further With Expose</h3><p>Beyond self-hosting, Expose also supports advanced features like user management for authentication, domain and shared site management, and an interface for easier administration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96bea1c36187" width="1" height="1" alt=""><hr><p><a href="https://medium.com/yield-studio/expose-an-alternative-to-ngrok-96bea1c36187">Expose: An Alternative to ngrok</a> was originally published in <a href="https://medium.com/yield-studio">The Yield Studio Playbook</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>