<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kyrylo Silin</title>
    <description>The latest articles on DEV Community by Kyrylo Silin (@kyrylo).</description>
    <link>https://dev.to/kyrylo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1280697%2F72a79454-99bd-4212-8779-a5a7cbaaff36.jpg</url>
      <title>DEV Community: Kyrylo Silin</title>
      <link>https://dev.to/kyrylo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kyrylo"/>
    <language>en</language>
    <item>
      <title>We Use Rails is now 100% free with real SEO juice (DR 34)</title>
      <dc:creator>Kyrylo Silin</dc:creator>
      <pubDate>Tue, 17 Jun 2025 09:42:40 +0000</pubDate>
      <link>https://dev.to/kyrylo/we-use-rails-is-now-100-free-with-real-seo-juice-dr-34-4hf8</link>
      <guid>https://dev.to/kyrylo/we-use-rails-is-now-100-free-with-real-seo-juice-dr-34-4hf8</guid>
      <description>&lt;p&gt;Hey everyone! I'm Kyrylo, the guy behind WeUseRails.com&lt;/p&gt;

&lt;p&gt;We Use Rails is a directory of web apps written with Ruby on Rails. I launched this project in January 2025, and it’s been a great success - it has accumulated over 100 projects so far, all submitted by Rails users.&lt;/p&gt;

&lt;p&gt;I originally planned a free+paid model where paid submissions would get a boost.&lt;/p&gt;

&lt;p&gt;But you know what? &lt;strong&gt;Screw it!&lt;/strong&gt; I want to make it free for everyone and support fellow indie Rails devs. Go submit your web app &lt;strong&gt;for free&lt;/strong&gt; and get featured . I’ll also post your app on the &lt;a href="https://x.com/weuserails" rel="noopener noreferrer"&gt;official X account&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I know how hard it is to get prominence as an indie dev, because I'm still struggling with this myself. So at the very least, I want to support my fellow Rails devs.&lt;/p&gt;

&lt;p&gt;Submit here:&lt;br&gt;
&lt;a href="https://weuserails.com" rel="noopener noreferrer"&gt;weuserails.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>rails</category>
    </item>
    <item>
      <title>There's no place for Test-Driven Development (TDD)</title>
      <dc:creator>Kyrylo Silin</dc:creator>
      <pubDate>Thu, 31 Oct 2024 13:01:57 +0000</pubDate>
      <link>https://dev.to/kyrylo/theres-no-place-for-test-driven-development-tdd-43lk</link>
      <guid>https://dev.to/kyrylo/theres-no-place-for-test-driven-development-tdd-43lk</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj8698a4qux4fhej1o9kd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj8698a4qux4fhej1o9kd.png" alt="Image description" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Test-Driven Development (TDD) &lt;em&gt;doesn’t make sense&lt;/em&gt; to me, especially when requirements change frequently.&lt;/p&gt;

&lt;p&gt;In TDD, the idea is to write tests before the actual code, allowing for a cycle of development where the tests guide implementation. But when requirements are always shifting, &lt;em&gt;I never find a point in the development cycle where TDD feels useful&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;When I develop a feature, I usually follow these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Make it work:&lt;/strong&gt; a mandatory, crappy implementation that gets the job done.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make it right:&lt;/strong&gt; a nice-to-have step, improving code maintainability and reusability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make it fast:&lt;/strong&gt; by this point, I’m already moving on to the next class or method, driven by the need for speed.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When it’s time to re-assess my work, that’s when I optimize for speed and write tests.&lt;/p&gt;

&lt;p&gt;At each of these stages, TDD creates &lt;strong&gt;friction&lt;/strong&gt;. And I don’t like friction. While tests add a valuable layer of assurance, they can also slow you down. The smoother the workflow, the happier we are.&lt;/p&gt;

&lt;p&gt;In theory, you should write tests that don’t depend on your implementation, allowing you to write the test once and change your implementation as needed.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;That’s supposed to reduce friction, right?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;However, in my practice, this is challenging. You end up thinking about abstractions instead of being productive and pushing out more customer-facing code. Instead of focusing on delivering features, I find myself entangled in a web of test cases and mock objects.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So, this leads to more friction instead.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I’ve tried TDD and have tested my code religiously before. Yet, I discovered that I spent more time in the &lt;code&gt;_test&lt;/code&gt; or &lt;code&gt;_spec&lt;/code&gt; files than in the files that actually implement a feature. It feels like running a marathon, only to find you’ve been looping around the same track.&lt;/p&gt;

&lt;p&gt;What many TDD proponents overlook is that tests can contribute to technical debt as well. The more tests you write, the more code you need to maintain.&lt;/p&gt;

&lt;p&gt;If you feel compelled to write a test every time you change a line, you could end up managing an Everest of tests - mountains of code that require as much care and attention as the features themselves.&lt;/p&gt;

&lt;p&gt;Ultimately, while TDD might work in stable environments, I prefer a more flexible approach to keep my workflow agile and responsive.code you need to maintain.&lt;/p&gt;

&lt;p&gt;If you feel compelled to write a test every time you change a line, you could end up managing an Everest of tests - mountains of code that require as much care and attention as the features themselves.&lt;/p&gt;

&lt;p&gt;Ultimately, while TDD might work in stable environments, I prefer a more flexible approach to keep my workflow agile and responsive.&lt;/p&gt;

</description>
      <category>tdd</category>
      <category>testing</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Cloudflare Tunnel: a free ngrok alternative for exposing local Rails apps to the internet</title>
      <dc:creator>Kyrylo Silin</dc:creator>
      <pubDate>Sun, 31 Mar 2024 13:27:03 +0000</pubDate>
      <link>https://dev.to/kyrylo/cloudflare-tunnel-a-free-ngrok-alternative-for-exposing-local-rails-apps-to-the-internet-3kkl</link>
      <guid>https://dev.to/kyrylo/cloudflare-tunnel-a-free-ngrok-alternative-for-exposing-local-rails-apps-to-the-internet-3kkl</guid>
      <description>&lt;p&gt;Imagine you want to test a new page that you just wrote the code for against a real mobile device. You don't want to push it into production without testing it. You somehow need to expose your local Rails server to the internet so that you (or anyone else) could test it before it goes live.&lt;/p&gt;

&lt;p&gt;These is a very common problem. Luckily, it's been solved already. My go-to tool for this was &lt;a href="https://ngrok.com" rel="noopener noreferrer"&gt;ngrok&lt;/a&gt; or &lt;a href="https://github.com/localtunnel/localtunnel" rel="noopener noreferrer"&gt;localtunnel&lt;/a&gt;. Both of these tools are great, but they didn't fit my needs perfectly.&lt;/p&gt;

&lt;p&gt;Ngrok is very advanced, but I don't need all of its features. The feature that I need is a static domain name, so that I can expose my local Rails app to the same address. On the free version, ngrok binds to a subdomain assigned to you randomly. A static domain name is a must if you want to save time developing your app.&lt;/p&gt;

&lt;p&gt;Localtunnel is an open-source alternative to ngrok that allows you to do just that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;lt &lt;span class="nt"&gt;--port&lt;/span&gt; 3000 &lt;span class="nt"&gt;--subdomain&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;telebugs &lt;span class="nt"&gt;--print-requests&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are a bunch of problems with localtunnel, though:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It's not maintained anymore, although it still works&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/localtunnel/localtunnel/issues/619" rel="noopener noreferrer"&gt;Downtimes do happen&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Sometimes, the tunnel just crashes, or your &lt;a href="https://github.com/localtunnel/localtunnel/issues/248" rel="noopener noreferrer"&gt;subdomain doesn't get bound&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To address the former, I wrapped my localtunnel in a &lt;code&gt;while&lt;/code&gt; loop like this:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do &lt;/span&gt;lt &lt;span class="nt"&gt;--port&lt;/span&gt; 3000 &lt;span class="nt"&gt;--subdomain&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;telebugs &lt;span class="nt"&gt;--print-requests&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;sleep &lt;/span&gt;1&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Anyone can hijack the subdomain that you use when your tunnel is not active.&lt;/p&gt;

&lt;p&gt;In fact, this happened to me last year, so I had to choose another subdomain:&lt;/p&gt;


&lt;blockquote&gt;
&lt;p&gt;Welp, crypto bros have "hijacked" my localtunnel subdomain that I've been using for Synonym Sprint.&lt;br&gt;&lt;br&gt;I had to choose a new name instead.&lt;br&gt;&lt;br&gt;It happened yesterday, and I thought maybe today it would be free again, but no, it is still running.&lt;br&gt;&lt;br&gt;It's not a big deal, since changing is… &lt;a href="https://t.co/G9eL8Lq4Hq" rel="noopener noreferrer"&gt;pic.twitter.com/G9eL8Lq4Hq&lt;/a&gt;&lt;/p&gt;— Kyrylo Silin (@kyrylosilin) &lt;a href="https://twitter.com/kyrylosilin/status/1740650930842878247?ref_src=twsrc%5Etfw" rel="noopener noreferrer"&gt;December 29, 2023&lt;/a&gt;
&lt;/blockquote&gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Meet the Cloudflare Tunnel
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Your domain name must be managed by Cloudflare. Otherwise, this tutorial &lt;em&gt;will not work&lt;/em&gt; for you.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Why would you go through all these struggles, when around the corner, there's a better alternative that solves all our problems?&lt;/p&gt;

&lt;p&gt;Without further ado, let's replace ngrok/localtunnel with&lt;br&gt;
&lt;a href="https://www.cloudflare.com/products/tunnel/" rel="noopener noreferrer"&gt;Cloudflare Tunnel&lt;/a&gt; in our Rails 7 app!&lt;/p&gt;
&lt;h3&gt;
  
  
  Installation
&lt;/h3&gt;

&lt;p&gt;Let's &lt;a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/" rel="noopener noreferrer"&gt;install&lt;/a&gt; the &lt;code&gt;cloudflared&lt;/code&gt; CLI app. On macOS, it's as simple as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;cloudflared
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Confirm that it's installed via:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;% cloudflared &lt;span class="nt"&gt;--version&lt;/span&gt;
cloudflared version 2024.3.0 &lt;span class="o"&gt;(&lt;/span&gt;built 2024-03-19T18:08:31Z&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Create a new tunnel
&lt;/h3&gt;

&lt;p&gt;First, you need to log into your Cloudflare account via &lt;code&gt;cloudflared&lt;/code&gt; so that&lt;br&gt;
you can manage CF tunnels via the CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;% cloudflared tunnel login
A browser window should have opened at the following URL:

https://dash.cloudflare.com/argotunnel?aud&lt;span class="o"&gt;=&lt;/span&gt;&amp;amp;callback&lt;span class="o"&gt;=&lt;/span&gt;https%3A%2F%2Flogin.cloudflareaccess.org%2F0n1R7UqQdRd7vR3D4CT3D4wzHoB0-63_RZ63vSVzIhakw%3D

If the browser failed to open, please visit the URL above directly &lt;span class="k"&gt;in &lt;/span&gt;your browser.
You have successfully logged &lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;
If you wish to copy your credentials to a server, they have been saved to:
/Users/kyrylo/.cloudflared/cert.pem
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Choose the domain for your Rails app and click "Authorize". That's all!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgur.com%2FAo4vTap.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgur.com%2FAo4vTap.png" alt="Authorize Cloudflare Tunnel" width="800" height="647"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, you need to create a named tunnel. I will name my tunnel &lt;code&gt;telebugs&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;% cloudflared tunnel create telebugs
Tunnel credentials written to /Users/kyrylo/.cloudflared/3de42678-313b-4801-bd71-1e4dda81880b.json. cloudflared chose this file based on where your origin certificate was found. Keep this file secret. To revoke these credentials, delete the tunnel.

Created tunnel telebugs with &lt;span class="nb"&gt;id &lt;/span&gt;3de42678-313b-4801-bd71-1e4dda81880b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will use that tunnel to access your local Rails app. Now you need to update your DNS records to point to that tunnel. Choose a subdomain that you would like to use to access your local Rails app. &lt;code&gt;localhost&lt;/code&gt; seems like a good choice: it's easy to understand, and it's unlikely you will want it for your production needs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;% cloudflared tunnel route dns telebugs localhost.telebugs.com
2024-03-31T09:59:33Z INF Added CNAME localhost.telebugs.com which will route to this tunnel &lt;span class="nv"&gt;tunnelID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3de42678-313b-4801-bd71-1e4dda81880b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Configure your Rails app to use the tunnel
&lt;/h3&gt;

&lt;p&gt;Create &lt;code&gt;config/cloudflare-tunnel.yml&lt;/code&gt; with the following contents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# config/clouflare-tunnel.yml&lt;/span&gt;
&lt;span class="na"&gt;tunnel&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;3de42678-313b-4801-bd71-1e4dda81880b&lt;/span&gt;
&lt;span class="na"&gt;credentials-file&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/Users/kyrylo/.cloudflared/3de42678-313b-4801-bd71-1e4dda81880b.json&lt;/span&gt;

&lt;span class="na"&gt;ingress&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;hostname&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;localhost.telebugs.com&lt;/span&gt;
    &lt;span class="na"&gt;service&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http://localhost:3000&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;service&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http_status:404&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: you must use the full path for &lt;code&gt;credentials-file&lt;/code&gt;. Cloudflare will not&lt;br&gt;
expand &lt;code&gt;$HOME&lt;/code&gt; or &lt;code&gt;~/&lt;/code&gt; for you, so&lt;br&gt;
&lt;code&gt;~/.cloudflared/3de42678-313b-4801-bd71-1e4dda81880b.json&lt;/code&gt; &lt;em&gt;will&lt;/em&gt; fail:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Tunnel credentials file &lt;span class="s1"&gt;'~/.cloudflared/3de42678-313b-4801-bd71-1e4dda81880b.json'&lt;/span&gt; doesn&lt;span class="s1"&gt;'t exist or is not a file
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, validate the tunnel's ingress:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;% cloudflared tunnel &lt;span class="nt"&gt;--config&lt;/span&gt; config/cloudflare-tunnel.yml ingress validate telebugs
Validating rules from config/cloudflare-tunnel.yml
OK
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ok, we're all good. Now we can add this file to &lt;code&gt;.gitignore&lt;/code&gt;, copy its contents&lt;br&gt;
to &lt;code&gt;config/cloudflare-tunnel.yml.example&lt;/code&gt;, redact &lt;code&gt;tunnel&lt;/code&gt; and&lt;br&gt;
&lt;code&gt;credentials-file&lt;/code&gt; values, and track it with &lt;code&gt;git&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;% &lt;span class="nb"&gt;echo &lt;/span&gt;config/cloudflare-tunnel.yml &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; .gitignore
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;% &lt;span class="nb"&gt;cp &lt;/span&gt;config/cloudflare-tunnel.yml config/cloudflare-tunnel.yml.example
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# config/clouflare-tunnel.yml.example&lt;/span&gt;
tunnel: CHANGE_ME
credentials-file: CHANGE_ME

ingress:
  - &lt;span class="nb"&gt;hostname&lt;/span&gt;: localhost.telebugs.com
    service: http://localhost:3000
  - service: http_status:404
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add config/clouflare-tunnel.yml.example
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One last thing we need to do is add &lt;code&gt;localhost.telebugs.com&lt;/code&gt; to the list of allowed domains so that Rack doesn't block it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="c1"&gt;# config/environments/development.rb&lt;/span&gt;

&lt;span class="no"&gt;Rails&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;application&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;configure&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hosts&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s2"&gt;"localhost.telebugs.com"&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Run the tunnel
&lt;/h3&gt;

&lt;p&gt;Awesome! We can now start using our tunnel. Let's confirm that it works:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;% cloudflared tunnel &lt;span class="nt"&gt;--url&lt;/span&gt; localhost:3000 &lt;span class="nt"&gt;--config&lt;/span&gt; config/cloudflare-tunnel.yml run telebugs
2024-03-31T11:19:10Z INF Starting tunnel &lt;span class="nv"&gt;tunnelID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3de42678-313b-4801-bd71-1e4dda81880b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, make sure your local Rails app is running, navigate to&lt;br&gt;
&lt;a href="https://telebugs.com" rel="noopener noreferrer"&gt;&lt;code&gt;https://localhost.telebugs.com&lt;/code&gt;&lt;/a&gt; (use your own domain), and verify that your local Rails server gets hit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;% curl &lt;span class="nt"&gt;-I&lt;/span&gt; https://localhost.telebugs.com
HTTP/2 200
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nice! We're almost done!&lt;/p&gt;

&lt;p&gt;Starting the tunnel every time is a hassle, so add it to the &lt;code&gt;Procfile&lt;/code&gt;, so that&lt;br&gt;
it is started automatically every time you launch your Rails app locally.&lt;/p&gt;

&lt;p&gt;Edit &lt;code&gt;Procfile&lt;/code&gt; and add the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Procfile&lt;/span&gt;
tunnel: cloudflared tunnel &lt;span class="nt"&gt;--url&lt;/span&gt; localhost:3000 &lt;span class="nt"&gt;--config&lt;/span&gt; config/cloudflared-tunnel.yml run telebugs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, every time you run &lt;code&gt;bin/dev&lt;/code&gt;, your Rails 7 application will start the tunnel, and you will be able to access your local server from anywhere on the internet. For free!&lt;/p&gt;

&lt;p&gt;Was the article helpful? &lt;a href="https://x.com/kyrylosilin" rel="noopener noreferrer"&gt;Follow me on X/Twitter&lt;/a&gt;&lt;br&gt;
where I post daily about my indie hacking journey and the projects I work on.&lt;/p&gt;

</description>
      <category>rails</category>
      <category>cloudflare</category>
      <category>ngrok</category>
    </item>
  </channel>
</rss>
