<?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: shristi modi</title>
    <description>The latest articles on DEV Community by shristi modi (@shristi_modi_1d0867dfeedd).</description>
    <link>https://dev.to/shristi_modi_1d0867dfeedd</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%2F3769295%2Fff88db4c-6f82-40ac-b8f6-9a033e5615c4.png</url>
      <title>DEV Community: shristi modi</title>
      <link>https://dev.to/shristi_modi_1d0867dfeedd</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shristi_modi_1d0867dfeedd"/>
    <language>en</language>
    <item>
      <title>Solve errors while setting up a production-project like a pro😎</title>
      <dc:creator>shristi modi</dc:creator>
      <pubDate>Sat, 25 Apr 2026 19:31:28 +0000</pubDate>
      <link>https://dev.to/shristi_modi_1d0867dfeedd/solve-errors-while-setting-up-a-production-project-like-a-pro-511a</link>
      <guid>https://dev.to/shristi_modi_1d0867dfeedd/solve-errors-while-setting-up-a-production-project-like-a-pro-511a</guid>
      <description>&lt;p&gt;When I was setting up a project using Cloudflare workers, bun, neon postgresql, hyperdrive binding, turbo monorepo. I realized one thing how much important it is to understand your errors before solving them. &lt;br&gt;
It was such a tedious task, but I'll help you not make those mistakes that I did. &lt;/p&gt;

&lt;p&gt;So, let's hop on guys. ✌️&lt;br&gt;
These tools really make your production so smooth that you can't ignore them. &lt;/p&gt;

&lt;p&gt;I'm gonna keep it short and deep.&lt;/p&gt;
&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;What is this tech stack?&lt;/li&gt;
&lt;li&gt;Setting up Bun and Turbo&lt;/li&gt;
&lt;li&gt;Configuring Neon and Hyperdrive&lt;/li&gt;
&lt;li&gt;Common Errors and Solutions&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  What are these tech-stacks?
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Cloudflare
&lt;/h3&gt;

&lt;p&gt;It is a provider of global-network(to connect apps/sites from anywhere in the world).&lt;br&gt;
Think of it like a provider with great network that helps anyone with a simple internet connection connect safely with your library(an app/site) that lives on a server. It acts as a guard to keep your library safe and reliable from bullies.&lt;/p&gt;
&lt;h3&gt;
  
  
  Cloudflare workers
&lt;/h3&gt;

&lt;p&gt;These are serverless platforms which provides for the apps and it lives inside the network. This is very near to your home library so that you don't have to travel far to just take or build things in your library. &lt;br&gt;
Your app follows the user wherever they go!&lt;/p&gt;
&lt;h3&gt;
  
  
  Bun
&lt;/h3&gt;

&lt;p&gt;The fastest package manager, it's an all-in-one tool for building and running js/ts as a file for production level without the need of any external tools. It's super fast and instant. &lt;/p&gt;
&lt;h3&gt;
  
  
  Neon
&lt;/h3&gt;

&lt;p&gt;A fully-serverless managed postgresql built to make database storage fast and cost efficient. It turns off compute when nothing is happening in your site/app and when requests arrives it just turn itself on instantly. Since it's postgresql it's organized so that we can find anything in split seconds.&lt;/p&gt;
&lt;h3&gt;
  
  
  Turbo Monorepo
&lt;/h3&gt;

&lt;p&gt;Think of it like a manager that manages multiple things at once and at same time without delaying and connecting them if necessary.&lt;/p&gt;
&lt;h2&gt;
  
  
  Setting up Bun and Turbo
&lt;/h2&gt;

&lt;p&gt;It's a very simple step to install them: &lt;/p&gt;
&lt;h3&gt;
  
  
  Install bun
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Windows:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;irm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;bun.sh/install.ps1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;iex&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Linux &amp;amp; WSL2:&lt;/strong&gt;&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;-fsSL&lt;/span&gt; https://bun.sh/install | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install turbo monorepo using bun -
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Works on all OS(windows, linux, wsl2) - bun add -g turbo&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Start a new project -
&lt;/h3&gt;

&lt;p&gt;bunx create-turbo@latest&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Pro-Tip:&lt;/strong&gt; Create a GitHub repo immediately and connect it to your Cloudflare project. This ensures that every commit is automatically built and deployed.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Configuring Neon and Hyperdrive
&lt;/h2&gt;

&lt;p&gt;With Neon you need to get a database connection string in neon.tech, have that string saved in .env in your nextjs project(apps/web). &lt;/p&gt;

&lt;p&gt;In your nextjs project write a wrangler.jsonc/wrangler.toml, here's the minimal setup(adjust according to your needs) for wrangler.jsonc:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"$schema"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./node_modules/wrangler/config-schema.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"main"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;".open-next/worker.js"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"[YOUR_APP_NAME]"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;today's&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;date&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"compatibility_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"[RECENT_DATE]"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"compatibility_flags"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"nodejs_compat"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"hyperdrive"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"binding"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"HYPERDRIVE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"[YOUR_ID]"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can get your Hyperdrive's ID from your cloudflare worker's dashboard in the hyperdrive section after clicking connect button.&lt;/p&gt;

&lt;h3&gt;
  
  
  Environment Variables
&lt;/h3&gt;

&lt;p&gt;Save these connection strings in your &lt;strong&gt;Cloudflare Dashboard (Settings &amp;gt; Variables)&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Key:&lt;/strong&gt; &lt;code&gt;CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_[YOUR_BINDING_NAME]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Value:&lt;/strong&gt; &lt;code&gt;[YOUR_NEON_CONNECTION_STRING]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Run and deploy your app on cloudflare workers:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Set the build command:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; bunx turbo run build &lt;span class="nt"&gt;--filter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;web...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Set the deploy command:&lt;/strong&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;cd &lt;/span&gt;apps/web &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; bun run deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;"cd apps/web to point cloudflare to the exact location."&lt;/p&gt;

&lt;p&gt;**The command from your terminal apps/web to deploy the Nextjs app on Cloudflare:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bunx wrangler deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Common Errors and Solutions
&lt;/h2&gt;

&lt;p&gt;The most annoying error I faced and I'll break it down so you don't have to face it - connecting neon postgresql with hyperdrive.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The "Missing Connection" Error
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; Connecting Neon PostgreSQL with Hyperdrive often fails because the connection strings aren't available during the build process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; &lt;br&gt;
You must add your variables in the &lt;strong&gt;Cloudflare Dashboard (Settings &amp;gt; Variables)&lt;/strong&gt;. &lt;br&gt;
Without this, Cloudflare won't be able to "see" your database during deployment.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Pro-Tip:&lt;/strong&gt; For local testing, create a &lt;code&gt;.dev.vars&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Example .dev.vars content&lt;/span&gt;
&lt;span class="nv"&gt;CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_HYPERDRIVE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"[NEON_CONNECTION_STRING]"&lt;/span&gt;
&lt;span class="nv"&gt;DATABASE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"[YOUR_URL_HERE]"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;(Remember to add &lt;code&gt;.dev.vars&lt;/code&gt; to your &lt;code&gt;.gitignore&lt;/code&gt;!)&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Mess around with these commands and you will have a project deployed and data will flow fast and securely for your users.&lt;br&gt;
This setup has been a game-changer for my production speed, but I’m curious is anyone else using Bun with Cloudflare Workers? What has your experience been with cold starts?&lt;/p&gt;

&lt;p&gt;If you liked this blog give a 💖 and follow for more. &lt;/p&gt;

</description>
      <category>postgressql</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>turborepo</category>
    </item>
    <item>
      <title>Solve errors while setting up a production-project like a pro😎</title>
      <dc:creator>shristi modi</dc:creator>
      <pubDate>Sat, 25 Apr 2026 19:31:28 +0000</pubDate>
      <link>https://dev.to/shristi_modi_1d0867dfeedd/solve-errors-while-setting-up-a-production-project-like-a-pro-2l2g</link>
      <guid>https://dev.to/shristi_modi_1d0867dfeedd/solve-errors-while-setting-up-a-production-project-like-a-pro-2l2g</guid>
      <description>&lt;p&gt;When I was setting up a project using Cloudflare workers, bun, neon postgresql, hyperdrive binding, turbo monorepo. I realized one thing how much important it is to understand your errors before solving them. &lt;br&gt;
It was such a tedious task, but I'll help you not make those mistakes that I did. &lt;/p&gt;

&lt;p&gt;So, let's hop on guys. ✌️&lt;br&gt;
These tools really make your production so smooth that you can't ignore them. &lt;/p&gt;

&lt;p&gt;I'm gonna keep it short and deep.&lt;/p&gt;
&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;What is this tech stack?&lt;/li&gt;
&lt;li&gt;Setting up Bun and Turbo&lt;/li&gt;
&lt;li&gt;Configuring Neon and Hyperdrive&lt;/li&gt;
&lt;li&gt;Common Errors and Solutions&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  What are these tech-stacks?
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Cloudflare
&lt;/h3&gt;

&lt;p&gt;It is a provider of global-network(to connect apps/sites from anywhere in the world).&lt;br&gt;
Think of it like a provider with great network that helps anyone with a simple internet connection connect safely with your library(an app/site) that lives on a server. It acts as a guard to keep your library safe and reliable from bullies.&lt;/p&gt;
&lt;h3&gt;
  
  
  Cloudflare workers
&lt;/h3&gt;

&lt;p&gt;These are serverless platforms which provides for the apps and it lives inside the network. This is very near to your home library so that you don't have to travel far to just take or build things in your library. &lt;br&gt;
Your app follows the user wherever they go!&lt;/p&gt;
&lt;h3&gt;
  
  
  Bun
&lt;/h3&gt;

&lt;p&gt;The fastest package manager, it's an all-in-one tool for building and running js/ts as a file for production level without the need of any external tools. It's super fast and instant. &lt;/p&gt;
&lt;h3&gt;
  
  
  Neon
&lt;/h3&gt;

&lt;p&gt;A fully-serverless managed postgresql built to make database storage fast and cost efficient. It turns off compute when nothing is happening in your site/app and when requests arrives it just turn itself on instantly. Since it's postgresql it's organized so that we can find anything in split seconds.&lt;/p&gt;
&lt;h3&gt;
  
  
  Turbo Monorepo
&lt;/h3&gt;

&lt;p&gt;Think of it like a manager that manages multiple things at once and at same time without delaying and connecting them if necessary.&lt;/p&gt;
&lt;h2&gt;
  
  
  Setting up Bun and Turbo
&lt;/h2&gt;

&lt;p&gt;It's a very simple step to install them: &lt;/p&gt;
&lt;h3&gt;
  
  
  Install bun
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Windows:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;irm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;bun.sh/install.ps1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;iex&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Linux &amp;amp; WSL2:&lt;/strong&gt;&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;-fsSL&lt;/span&gt; https://bun.sh/install | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install turbo monorepo using bun -
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Works on all OS(windows, linux, wsl2) - bun add -g turbo&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Start a new project -
&lt;/h3&gt;

&lt;p&gt;bunx create-turbo@latest&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Pro-Tip:&lt;/strong&gt; Create a GitHub repo immediately and connect it to your Cloudflare project. This ensures that every commit is automatically built and deployed.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Configuring Neon and Hyperdrive
&lt;/h2&gt;

&lt;p&gt;With Neon you need to get a database connection string in neon.tech, have that string saved in .env in your nextjs project(apps/web). &lt;/p&gt;

&lt;p&gt;In your nextjs project write a wrangler.jsonc/wrangler.toml, here's the minimal setup(adjust according to your needs) for wrangler.jsonc:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"$schema"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"./node_modules/wrangler/config-schema.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"main"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;".open-next/worker.js"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"[YOUR_APP_NAME]"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;today's&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;date&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"compatibility_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"[RECENT_DATE]"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"compatibility_flags"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"nodejs_compat"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"hyperdrive"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"binding"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"HYPERDRIVE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"[YOUR_ID]"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can get your Hyperdrive's ID from your cloudflare worker's dashboard in the hyperdrive section after clicking connect button.&lt;/p&gt;

&lt;h3&gt;
  
  
  Environment Variables
&lt;/h3&gt;

&lt;p&gt;Save these connection strings in your &lt;strong&gt;Cloudflare Dashboard (Settings &amp;gt; Variables)&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Key:&lt;/strong&gt; &lt;code&gt;CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_[YOUR_BINDING_NAME]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Value:&lt;/strong&gt; &lt;code&gt;[YOUR_NEON_CONNECTION_STRING]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Run and deploy your app on cloudflare workers:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Set the build command:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; bunx turbo run build &lt;span class="nt"&gt;--filter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;web...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Set the deploy command:&lt;/strong&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;cd &lt;/span&gt;apps/web &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; bun run deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;"cd apps/web to point cloudflare to the exact location."&lt;/p&gt;

&lt;p&gt;**The command from your terminal apps/web to deploy the Nextjs app on Cloudflare:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bunx wrangler deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Common Errors and Solutions
&lt;/h2&gt;

&lt;p&gt;The most annoying error I faced and I'll break it down so you don't have to face it - connecting neon postgresql with hyperdrive.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The "Missing Connection" Error
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; Connecting Neon PostgreSQL with Hyperdrive often fails because the connection strings aren't available during the build process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; &lt;br&gt;
You must add your variables in the &lt;strong&gt;Cloudflare Dashboard (Settings &amp;gt; Variables)&lt;/strong&gt;. &lt;br&gt;
Without this, Cloudflare won't be able to "see" your database during deployment.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Pro-Tip:&lt;/strong&gt; For local testing, create a &lt;code&gt;.dev.vars&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Example .dev.vars content&lt;/span&gt;
&lt;span class="nv"&gt;CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_HYPERDRIVE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"[NEON_CONNECTION_STRING]"&lt;/span&gt;
&lt;span class="nv"&gt;DATABASE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"[YOUR_URL_HERE]"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;(Remember to add &lt;code&gt;.dev.vars&lt;/code&gt; to your &lt;code&gt;.gitignore&lt;/code&gt;!)&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Mess around with these commands and you will have a project deployed and data will flow fast and securely for your users.&lt;br&gt;
This setup has been a game-changer for my production speed, but I’m curious is anyone else using Bun with Cloudflare Workers? What has your experience been with cold starts?&lt;/p&gt;

&lt;p&gt;If you liked this blog give a 💖 and follow for more. &lt;/p&gt;

</description>
      <category>postgressql</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>turborepo</category>
    </item>
  </channel>
</rss>
