<?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: Dev Encyclopedia</title>
    <description>The latest articles on DEV Community by Dev Encyclopedia (@dev_encyclopedia).</description>
    <link>https://dev.to/dev_encyclopedia</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3960190%2F006fbb41-1855-46cb-a641-7e9f5326421e.png</url>
      <title>DEV Community: Dev Encyclopedia</title>
      <link>https://dev.to/dev_encyclopedia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dev_encyclopedia"/>
    <language>en</language>
    <item>
      <title>CSS Anchor Positioning: Migrating shadcn/ui Off Radix</title>
      <dc:creator>Dev Encyclopedia</dc:creator>
      <pubDate>Sun, 12 Jul 2026 01:43:18 +0000</pubDate>
      <link>https://dev.to/dev_encyclopedia/css-anchor-positioning-migrating-shadcnui-off-radix-3j2o</link>
      <guid>https://dev.to/dev_encyclopedia/css-anchor-positioning-migrating-shadcnui-off-radix-3j2o</guid>
      <description>&lt;p&gt;CSS Anchor Positioning and the native Popover API reached full Baseline support across major browsers in 2026. That means shadcn/ui's Popover and Tooltip, both built on Radix UI primitives, can now be rebuilt with zero JavaScript for positioning.&lt;/p&gt;

&lt;p&gt;Radix (via Floating UI) has always handled the hard part: measuring the trigger, calculating placement, listening for scroll/resize, flipping on overflow. That required JS because the browser couldn't do it natively. Now it can.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you gain and lose
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Radix + Floating UI&lt;/th&gt;
&lt;th&gt;Native CSS Anchor Positioning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Bundle size&lt;/td&gt;
&lt;td&gt;Adds a dependency per component&lt;/td&gt;
&lt;td&gt;Zero JS for positioning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Runtime cost&lt;/td&gt;
&lt;td&gt;Recalculates on scroll/resize&lt;/td&gt;
&lt;td&gt;Browser handles it natively&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Viewport flip&lt;/td&gt;
&lt;td&gt;Floating UI's &lt;code&gt;flip()&lt;/code&gt; middleware&lt;/td&gt;
&lt;td&gt;&lt;code&gt;position-try-fallbacks&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Focus trapping&lt;/td&gt;
&lt;td&gt;Built in&lt;/td&gt;
&lt;td&gt;You implement it, or keep Radix&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Keyboard nav&lt;/td&gt;
&lt;td&gt;Built into Radix&lt;/td&gt;
&lt;td&gt;Manual for complex cases&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Browser support&lt;/td&gt;
&lt;td&gt;Works everywhere JS runs&lt;/td&gt;
&lt;td&gt;Needs Baseline 2026 + Safari fallback&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For a simple Tooltip or a Popover holding text and a button, native CSS wins outright. For DropdownMenu or Select, keep Radix, the focus trapping and keyboard navigation aren't worth rebuilding by hand yet.&lt;/p&gt;

&lt;h2&gt;
  
  
  The shape of the migration
&lt;/h2&gt;

&lt;p&gt;The native Popover component uses &lt;code&gt;anchor-name&lt;/code&gt; to mark the trigger, &lt;code&gt;anchor()&lt;/code&gt; to position the content relative to it, and the browser's built-in &lt;code&gt;popover&lt;/code&gt; attribute for top-layer rendering, light-dismiss, and Escape-to-close:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;PopoverContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;forwardRef&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;HTMLDivElement&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;HTMLAttributes&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;HTMLDivElement&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ctx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;useContext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;PopoverContext&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;
        &lt;span class="na"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;contentId&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="na"&gt;popover&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"auto"&lt;/span&gt;
        &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;positionAnchor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`--&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;triggerId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`anchor(--&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;triggerId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; bottom)`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;positionTryFallbacks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flip-block, flip-inline&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No &lt;code&gt;Portal&lt;/code&gt;, no scroll/resize listeners, no Floating UI middleware to configure. &lt;code&gt;popover="auto"&lt;/code&gt; gives light-dismiss and Escape-to-close for free. Tooltip follows the same pattern with &lt;code&gt;popover="hint"&lt;/code&gt; instead.&lt;/p&gt;

&lt;p&gt;One catch: Safari 18.2-18.3 support &lt;code&gt;anchor()&lt;/code&gt; but not &lt;code&gt;position-try-fallbacks&lt;/code&gt;. Write your base position as a plain value outside the fallback block and it degrades gracefully, no &lt;code&gt;@supports&lt;/code&gt; check needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adoption order
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Tooltip first&lt;/strong&gt; - lowest risk, no focus management to preserve&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simple Popovers next&lt;/strong&gt; - text, single button, one-field forms&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Leave DropdownMenu and Select on Radix&lt;/strong&gt; - the keyboard nav and focus trapping rebuild isn't worth it yet&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Measure bundle size&lt;/strong&gt; before and after each migration to justify the effort&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The full post has the complete before/after code for both components, the Safari fallback pattern in detail, and what you still need Radix for:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://devencyclopedia.com/blog/shadcn-radix-css-anchor-positioning-migration" rel="noopener noreferrer"&gt;CSS Anchor Positioning: Migrating shadcn/ui Off Radix&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>react</category>
      <category>javascript</category>
    </item>
    <item>
      <title>npm postinstall Attacks in 2026: How They Actually Work (and How to Defend Against Them)</title>
      <dc:creator>Dev Encyclopedia</dc:creator>
      <pubDate>Thu, 09 Jul 2026 02:51:24 +0000</pubDate>
      <link>https://dev.to/dev_encyclopedia/npm-postinstall-attacks-in-2026-how-they-actually-work-and-how-to-defend-against-them-2jmn</link>
      <guid>https://dev.to/dev_encyclopedia/npm-postinstall-attacks-in-2026-how-they-actually-work-and-how-to-defend-against-them-2jmn</guid>
      <description>&lt;p&gt;Every time you run &lt;code&gt;npm install&lt;/code&gt;, you're not just downloading files. You're potentially executing arbitrary code, automatically, with your user permissions, before you've looked at a single line of what you just installed.&lt;/p&gt;

&lt;p&gt;This isn't theoretical. Since the Shai-Hulud worm first appeared in September 2025, npm supply chain attacks abusing this exact mechanism have kept accelerating. On June 1, 2026, a campaign compromised at least 32 packages under the &lt;code&gt;@redhat-cloud-services&lt;/code&gt; npm namespace, bypassing code review entirely through a compromised employee GitHub account.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the hooks actually work
&lt;/h2&gt;

&lt;p&gt;npm packages can define three install-time hooks in &lt;code&gt;package.json&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;preinstall&lt;/strong&gt; — runs before the package's dependencies are installed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;install&lt;/strong&gt; — runs during the install step itself&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;postinstall&lt;/strong&gt; — runs after the package and its dependencies finish installing
&lt;/li&gt;
&lt;/ul&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;"scripts"&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;"postinstall"&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 scripts/setup.js"&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;These exist for legit reasons: &lt;code&gt;bcrypt&lt;/code&gt; and &lt;code&gt;sharp&lt;/code&gt; compile native C++ bindings this way, Puppeteer downloads browser binaries. But npm runs these for &lt;em&gt;every&lt;/em&gt; package in your tree, direct or transitive, by default. Only about 2.2% of packages on the registry actually define install scripts, so most of your tree doesn't need this at all. One compromised package in a tree of hundreds is enough.&lt;/p&gt;

&lt;h2&gt;
  
  
  Roughly how a real attack unfolds
&lt;/h2&gt;

&lt;p&gt;A Microsoft-tracked campaign from May 2026 followed a pattern that's becoming common:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Attacker registers npm packages under lookalike scopes mimicking internal corporate namespaces&lt;/li&gt;
&lt;li&gt;An inflated version number wins dependency resolution against your real internal package&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;postinstall&lt;/code&gt; hook fires an obfuscated script that phones home and drops a payload, before you can intervene&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's the shape of it. The actual obfuscation technique and how the payload survives after the install process exits is where it gets interesting, and where most write-ups stop short.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this is genuinely hard to catch
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Legit packages need postinstall too, so blanket-flagging trains teams to ignore warnings&lt;/li&gt;
&lt;li&gt;Obfuscation makes a 17KB dropper look like nothing on casual review&lt;/li&gt;
&lt;li&gt;Cross-ecosystem placement: a May 2026 campaign hid malicious &lt;code&gt;postinstall&lt;/code&gt; inside &lt;code&gt;package.json&lt;/code&gt; files bundled in &lt;strong&gt;PHP/Composer&lt;/strong&gt; packages, since PHP security reviewers don't think to check bundled JS tooling&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The published npm tarball isn't guaranteed to match the GitHub repo.&lt;/strong&gt; Attackers can publish a malicious tarball while keeping the public repo clean, and almost nobody diffs the two&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;npm audit&lt;/code&gt; and Dependabot are both reactive too. They rely on a CVE already existing. A freshly published malicious package with an obfuscated postinstall script sails through both cleanly.&lt;/p&gt;

&lt;h2&gt;
  
  
  The mental model worth keeping
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;npm install&lt;/code&gt; is not a download. It's potential code execution. Every dependency you add is code you're agreeing to &lt;em&gt;run&lt;/em&gt;, not just import.&lt;/p&gt;




&lt;p&gt;I go deep on this in the full write-up: the real obfuscation/C2 pattern from the May 2026 campaign, the monorepo and CI-specific exposure most guides skip, a copy-paste command checklist, and why &lt;code&gt;--ignore-scripts&lt;/code&gt; breaks some legit packages (and the workaround for that).&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;Full guide: &lt;a href="https://devencyclopedia.com/blog/npm-postinstall-attacks-2026" rel="noopener noreferrer"&gt;https://devencyclopedia.com/blog/npm-postinstall-attacks-2026&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Also built a free tool if you'd rather get a risk-scored report than run manual greps: &lt;a href="https://devencyclopedia.com/tools/lifecycle-hook-scanner" rel="noopener noreferrer"&gt;Lifecycle Hook Scanner&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  javascript #node #security #webdev
&lt;/h1&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>security</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The New HTTP QUERY Method: How to Use It in Node.js and Express Today</title>
      <dc:creator>Dev Encyclopedia</dc:creator>
      <pubDate>Wed, 08 Jul 2026 04:00:20 +0000</pubDate>
      <link>https://dev.to/dev_encyclopedia/the-new-http-query-method-how-to-use-it-in-nodejs-and-express-today-5e6a</link>
      <guid>https://dev.to/dev_encyclopedia/the-new-http-query-method-how-to-use-it-in-nodejs-and-express-today-5e6a</guid>
      <description>&lt;p&gt;There's a new HTTP method called QUERY. It's safe like GET (doesn't change data) but can carry a body like POST (so you can send filters). This means search endpoints no longer need the old &lt;code&gt;POST /search&lt;/code&gt; trick.&lt;/p&gt;

&lt;p&gt;Let's see how to use it in Node.js and Express.&lt;/p&gt;

&lt;h2&gt;
  
  
  Plain Node.js
&lt;/h2&gt;

&lt;p&gt;Node already understands QUERY, no setup needed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;http&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;node:http&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;server&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;http&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createServer&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;method&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;QUERY&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;body&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;end&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;filters&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeHead&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
      &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;end&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;results&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="nx"&gt;filters&lt;/span&gt; &lt;span class="p"&gt;}));&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeHead&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;404&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;end&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Test with curl:&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;-X&lt;/span&gt; QUERY http://localhost:3000 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"category":"electronics"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Express
&lt;/h2&gt;

&lt;p&gt;Express doesn't support &lt;code&gt;app.query()&lt;/code&gt; yet, so add a small check before your routes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;express&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;express&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;method&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;QUERY&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/products&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;filters&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;results&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="nx"&gt;filters&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nf"&gt;next&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. &lt;code&gt;express.json()&lt;/code&gt; already parses the body, no extra config needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  One gotcha: CORS
&lt;/h2&gt;

&lt;p&gt;If your frontend and backend are on different domains, add QUERY to your CORS methods, or the browser will silently block it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;cors&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;methods&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;GET&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;QUERY&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;OPTIONS&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;}));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Quick summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Node.js: works out of the box&lt;/li&gt;
&lt;li&gt;Express: needs a small manual check (shown above)&lt;/li&gt;
&lt;li&gt;Browsers: support is still patchy, so keep a POST fallback for now&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Full article with more details: &lt;a href="https://devencyclopedia.com/blog/http-query-method-express-nodejs" rel="noopener noreferrer"&gt;https://devencyclopedia.com/blog/http-query-method-express-nodejs&lt;/a&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>express</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Git Worktrees for Parallel AI Coding Agents: The Complete 2026 Workflow</title>
      <dc:creator>Dev Encyclopedia</dc:creator>
      <pubDate>Tue, 07 Jul 2026 03:02:27 +0000</pubDate>
      <link>https://dev.to/dev_encyclopedia/git-worktrees-for-parallel-ai-coding-agents-the-complete-2026-workflow-1g16</link>
      <guid>https://dev.to/dev_encyclopedia/git-worktrees-for-parallel-ai-coding-agents-the-complete-2026-workflow-1g16</guid>
      <description>&lt;h2&gt;
  
  
  The Problem With Running Multiple AI Agents on One Checkout
&lt;/h2&gt;

&lt;p&gt;If you've tried running two AI coding agents (or juggling two features yourself) in the same git checkout, you've probably hit this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;File edits get overwritten between sessions&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;package.json&lt;/code&gt; and lockfiles get corrupted from simultaneous writes&lt;/li&gt;
&lt;li&gt;Agent context gets polluted with half-finished, unrelated changes&lt;/li&gt;
&lt;li&gt;You end up working sequentially instead of in parallel, which defeats the whole point&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There's a git feature built for exactly this, and it's been around since git 2.5 (2015): &lt;strong&gt;worktrees&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are Git Worktrees?
&lt;/h2&gt;

&lt;p&gt;A worktree lets you check out multiple branches from the &lt;em&gt;same repository&lt;/em&gt; into separate directories at the same time.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One shared &lt;code&gt;.git&lt;/code&gt; history and object database&lt;/li&gt;
&lt;li&gt;Multiple independent working directories, each on its own branch&lt;/li&gt;
&lt;li&gt;No duplication of git internals, only the checked-out files
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git worktree add ../app-auth feature/auth
git worktree add ../app-api feature/api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you have two fully independent folders, each with its own files, its own &lt;code&gt;node_modules&lt;/code&gt;, and its own staging area, both pointing at the same repo history.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters for AI Coding Agents
&lt;/h2&gt;

&lt;p&gt;Point one Claude Code (or any AI agent) session at each worktree folder, and they run &lt;strong&gt;completely in parallel&lt;/strong&gt; with zero collisions. No stashing, no branch-switching dance, no waiting your turn.&lt;/p&gt;

&lt;p&gt;Claude Code even ships a native &lt;code&gt;--worktree&lt;/code&gt; flag that auto-generates the branch name and directory setup for you in a single command.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Covered in the Full Guide
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Step-by-step worktree setup and teardown&lt;/li&gt;
&lt;li&gt;Common errors: stale locks, missing &lt;code&gt;.env&lt;/code&gt; files, "branch already checked out"&lt;/li&gt;
&lt;li&gt;A clear framework for when worktrees are worth the overhead and when they're not&lt;/li&gt;
&lt;li&gt;Practical integration with AI coding agent workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Read the full breakdown here: &lt;a href="https://devencyclopedia.com/blog/git-worktrees-parallel-ai-coding-agents" rel="noopener noreferrer"&gt;https://devencyclopedia.com/blog/git-worktrees-parallel-ai-coding-agents&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're running multi-agent AI coding setups, this is foundational infrastructure worth understanding properly.&lt;/p&gt;

</description>
      <category>git</category>
      <category>ai</category>
      <category>productivity</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Stop Guessing Which Temporal Type to Use: A Free Interactive Picker</title>
      <dc:creator>Dev Encyclopedia</dc:creator>
      <pubDate>Mon, 06 Jul 2026 03:23:06 +0000</pubDate>
      <link>https://dev.to/dev_encyclopedia/stop-guessing-which-temporal-type-to-use-a-free-interactive-picker-3hch</link>
      <guid>https://dev.to/dev_encyclopedia/stop-guessing-which-temporal-type-to-use-a-free-interactive-picker-3hch</guid>
      <description>&lt;p&gt;JavaScript's &lt;code&gt;Temporal&lt;/code&gt; API gives you six different types for representing dates and times: &lt;code&gt;Instant&lt;/code&gt;, &lt;code&gt;ZonedDateTime&lt;/code&gt;, &lt;code&gt;PlainDate&lt;/code&gt;, &lt;code&gt;PlainDateTime&lt;/code&gt;, &lt;code&gt;PlainTime&lt;/code&gt;, and &lt;code&gt;PlainYearMonth&lt;/code&gt;. Picking the wrong one is an easy mistake, and it usually shows up later as a timezone bug, a DST edge case, or data that silently loses precision.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Most guides explain what each &lt;code&gt;Temporal&lt;/code&gt; type &lt;em&gt;is&lt;/em&gt;, but not which one you should actually use for your specific field. Should a "created at" timestamp be an &lt;code&gt;Instant&lt;/code&gt; or a &lt;code&gt;ZonedDateTime&lt;/code&gt;? What about a user's birthday? A recurring meeting time?&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;I built a small interactive tool called the &lt;strong&gt;Temporal Type Picker&lt;/strong&gt; to answer this in two quick questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What are you modeling? (a point in time, a calendar date, a wall-clock time, or a duration)&lt;/li&gt;
&lt;li&gt;Does timezone information matter for your use case?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Based on your answers, it gives you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The exact &lt;code&gt;Temporal&lt;/code&gt; type to use&lt;/li&gt;
&lt;li&gt;Ready-to-copy constructor code&lt;/li&gt;
&lt;li&gt;The matching PostgreSQL column type for your schema&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's fully client-side, no signup, no data collection, and works entirely in your browser.&lt;/p&gt;

&lt;p&gt;🔗 Try it here: &lt;a href="https://devencyclopedia.com/tools/temporal-type-picker" rel="noopener noreferrer"&gt;Temporal Type Picker&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're working with dates in modern JavaScript or designing a schema that touches timestamps, this should save you a debugging session or two.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>typescript</category>
      <category>node</category>
    </item>
    <item>
      <title>Claude Fable 5: What It Is and When to Use It</title>
      <dc:creator>Dev Encyclopedia</dc:creator>
      <pubDate>Sun, 05 Jul 2026 04:35:52 +0000</pubDate>
      <link>https://dev.to/dev_encyclopedia/claude-fable-5-what-it-is-and-when-to-use-it-2fjo</link>
      <guid>https://dev.to/dev_encyclopedia/claude-fable-5-what-it-is-and-when-to-use-it-2fjo</guid>
      <description>&lt;p&gt;Anthropic just released Claude Fable 5, the first public model from its new Mythos tier. If you're picking between this and Opus 4.8 for your next project, here's what actually matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Makes It Different
&lt;/h2&gt;

&lt;p&gt;Claude Fable 5 is built for &lt;strong&gt;long-horizon agentic work&lt;/strong&gt;: multi-day coding sessions, large-scale migrations, and workflows that need to plan, execute, and self-verify without constant hand-holding.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1M token context window&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Up to &lt;strong&gt;128K output tokens&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Always-on adaptive thinking&lt;/li&gt;
&lt;li&gt;Its performance edge over Opus 4.8 grows as task complexity increases. On quick, simple tasks the gap is small. On multi-step agentic workflows, it's significant.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Safety Fallback You Should Know About
&lt;/h2&gt;

&lt;p&gt;Sensitive queries touching cybersecurity, biology, or chemistry automatically reroute to Opus 4.8, and are billed at &lt;strong&gt;Opus rates&lt;/strong&gt;, not Fable 5 rates. Worth knowing before you budget a project around it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is It Worth the Cost?
&lt;/h2&gt;

&lt;p&gt;Fable 5 costs roughly &lt;strong&gt;2x Opus 4.8&lt;/strong&gt; per token. But token cost isn't the number that matters, &lt;strong&gt;cost per completed task&lt;/strong&gt; is.&lt;/p&gt;

&lt;p&gt;If Fable 5 nails a hard job on the first attempt where a cheaper model needs two or three retries to get there, it can end up cheaper overall, not more expensive.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Use Which
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Use Case&lt;/th&gt;
&lt;th&gt;Recommended Model&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Quick edits, simple scripts&lt;/td&gt;
&lt;td&gt;Opus 4.8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-day agentic coding tasks&lt;/td&gt;
&lt;td&gt;Fable 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large-scale refactors/migrations&lt;/td&gt;
&lt;td&gt;Fable 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cyber/bio/chem-sensitive queries&lt;/td&gt;
&lt;td&gt;Auto-routes to Opus 4.8&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Full breakdown with benchmarks, pricing tables, and a complete decision framework in the original post:&lt;/p&gt;

&lt;p&gt;🔗 Read the full guide:&lt;br&gt;
&lt;a href="https://devencyclopedia.com/blog/claude-fable-5-guide" rel="noopener noreferrer"&gt;https://devencyclopedia.com/blog/claude-fable-5-guide&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;What's been your experience with Fable 5 so far? Drop a comment below.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claude</category>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>How to Use Environment Variables in Next.js (Without Leaking Them to the Browser)</title>
      <dc:creator>Dev Encyclopedia</dc:creator>
      <pubDate>Sat, 04 Jul 2026 03:47:16 +0000</pubDate>
      <link>https://dev.to/dev_encyclopedia/how-to-use-environment-variables-in-nextjs-without-leaking-them-to-the-browser-p0a</link>
      <guid>https://dev.to/dev_encyclopedia/how-to-use-environment-variables-in-nextjs-without-leaking-them-to-the-browser-p0a</guid>
      <description>&lt;p&gt;If you've worked with Next.js for a while, you've probably run into this at least once: an environment variable that works perfectly on your machine, then either goes missing after deploy or, worse, shows up in the browser where anyone can see it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The core rule
&lt;/h2&gt;

&lt;p&gt;Next.js splits environment variables into two groups:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Server only (default)&lt;/strong&gt;: plain names like &lt;code&gt;DATABASE_URL&lt;/code&gt; or &lt;code&gt;API_SECRET_KEY&lt;/code&gt;. These never reach the browser.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public&lt;/strong&gt;: any variable prefixed with &lt;code&gt;NEXT_PUBLIC_&lt;/code&gt;. These get bundled into your client JavaScript and are visible to anyone using DevTools.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Mixing these up is how secrets end up exposed.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the full guide covers
&lt;/h2&gt;

&lt;p&gt;In the complete post, I break down:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How Next.js loads &lt;code&gt;.env&lt;/code&gt;, &lt;code&gt;.env.local&lt;/code&gt;, &lt;code&gt;.env.production&lt;/code&gt;, and friends, and in what order&lt;/li&gt;
&lt;li&gt;Build time vs runtime variables, and why this distinction trips people up in Docker and Cloudflare setups&lt;/li&gt;
&lt;li&gt;How to validate your environment variables so a missing one fails your build instead of crashing in production&lt;/li&gt;
&lt;li&gt;Correct setup for Vercel, Cloudflare, and Docker deployments&lt;/li&gt;
&lt;li&gt;Sneaky mistakes, like destructuring &lt;code&gt;process.env&lt;/code&gt;, that silently break variable access&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Full guide here: &lt;a href="https://devencyclopedia.com/blog/nextjs-environment-variables" rel="noopener noreferrer"&gt;https://devencyclopedia.com/blog/nextjs-environment-variables&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have you ever shipped a secret to the browser by mistake? Drop your story in the comments, happy to compare notes.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>typescript</category>
    </item>
    <item>
      <title>45 OOP Interview Questions and Answers (2026)</title>
      <dc:creator>Dev Encyclopedia</dc:creator>
      <pubDate>Fri, 03 Jul 2026 03:28:57 +0000</pubDate>
      <link>https://dev.to/dev_encyclopedia/45-oop-interview-questions-and-answers-2026-k6p</link>
      <guid>https://dev.to/dev_encyclopedia/45-oop-interview-questions-and-answers-2026-k6p</guid>
      <description>&lt;p&gt;Preparing for an OOP interview in 2026? I put together a guide covering 45 questions that actually come up, from the four pillars all the way to SOLID principles and design patterns.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's inside
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The four pillars explained with real code, not just definitions&lt;/li&gt;
&lt;li&gt;Encapsulation vs Abstraction, the pair almost everyone mixes up&lt;/li&gt;
&lt;li&gt;Method Overloading vs Overriding&lt;/li&gt;
&lt;li&gt;All 5 SOLID principles, each with a violation and a fix&lt;/li&gt;
&lt;li&gt;8 design patterns interviewers actually ask about (Singleton, Factory, Observer, Strategy, Decorator, Adapter, and more)&lt;/li&gt;
&lt;li&gt;A full parking lot system design walkthrough&lt;/li&gt;
&lt;li&gt;Java, Python, JavaScript, and C# quirks compared side by side&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whether you're prepping for a frontend, backend, or full stack interview, OOP fundamentals show up everywhere. This guide is built to be skimmed fast and used as an actual reference, not just read once and forgotten.&lt;/p&gt;

&lt;p&gt;Full guide here: &lt;a href="https://devencyclopedia.com/blog/oop-interview-questions" rel="noopener noreferrer"&gt;https://devencyclopedia.com/blog/oop-interview-questions&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What OOP interview question trips you up the most? Drop it in the comments.&lt;/p&gt;

</description>
      <category>oop</category>
      <category>interview</category>
      <category>javascript</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Next.js middleware.ts to proxy.ts: What Changes and Why It Matters</title>
      <dc:creator>Dev Encyclopedia</dc:creator>
      <pubDate>Thu, 02 Jul 2026 04:13:26 +0000</pubDate>
      <link>https://dev.to/dev_encyclopedia/nextjs-middlewarets-to-proxyts-what-changes-and-why-it-matters-50gl</link>
      <guid>https://dev.to/dev_encyclopedia/nextjs-middlewarets-to-proxyts-what-changes-and-why-it-matters-50gl</guid>
      <description>&lt;p&gt;Next.js 16 quietly renamed &lt;code&gt;middleware.ts&lt;/code&gt; to &lt;code&gt;proxy.ts&lt;/code&gt;. Most changelogs bury it next to Cache Components and Turbopack updates, but it deserves its own conversation.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Actually Changes
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Filename&lt;/strong&gt;: &lt;code&gt;middleware.ts&lt;/code&gt; becomes &lt;code&gt;proxy.ts&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Export&lt;/strong&gt;: named export &lt;code&gt;middleware&lt;/code&gt; becomes default export &lt;code&gt;proxy&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Default runtime&lt;/strong&gt;: Edge becomes Node.js&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That third point is the one worth sitting with. Edge runtime gave you global low latency distribution but a restricted API surface, so you were often stuck finding Edge compatible forks of packages or writing workarounds. Node.js runtime removes most of that friction since &lt;code&gt;proxy.ts&lt;/code&gt; now has full Node API access by default.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do You Need to Migrate Right Now?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;middleware.ts&lt;/code&gt; still works. It's deprecated, not removed, so nothing breaks on upgrade.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;If your middleware just checks cookies, headers, or does basic redirects&lt;/strong&gt;: migrate now, it's roughly a five minute rename and retest.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If you're leaning on Edge specific geo distribution or Edge only APIs&lt;/strong&gt;: branch it, benchmark &lt;code&gt;proxy.ts&lt;/code&gt; under real traffic patterns first, then decide.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's in the Full Guide
&lt;/h2&gt;

&lt;p&gt;The full writeup covers a real auth check example migrated step by step, a compatibility table for what breaks (and what doesn't) under the Node.js runtime, and a free tool that rewrites your middleware file for you automatically.&lt;/p&gt;

&lt;p&gt;Read the full guide: &lt;a href="https://devencyclopedia.com/blog/nextjs-middleware-to-proxy" rel="noopener noreferrer"&gt;https://devencyclopedia.com/blog/nextjs-middleware-to-proxy&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Curious what others are seeing here, has anyone hit compatibility issues moving from Edge to Node.js runtime in production?&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>typescript</category>
    </item>
    <item>
      <title>50 DSA Interview Questions and Answers (2026)</title>
      <dc:creator>Dev Encyclopedia</dc:creator>
      <pubDate>Wed, 01 Jul 2026 02:45:44 +0000</pubDate>
      <link>https://dev.to/dev_encyclopedia/50-dsa-interview-questions-and-answers-2026-2hkg</link>
      <guid>https://dev.to/dev_encyclopedia/50-dsa-interview-questions-and-answers-2026-2hkg</guid>
      <description>&lt;p&gt;Most developers memorize 300+ coding problems before interviews.&lt;/p&gt;

&lt;p&gt;The ones who actually get hired? &lt;strong&gt;They learn 8 patterns that cover 90% of everything.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I just published a complete DSA interview prep guide with 50 questions and answers — and the most important part isn't the solutions. &lt;strong&gt;It's the patterns behind them.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Here's what I mean:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The "Two Pointers" pattern&lt;/strong&gt; solves sorted array problems.&lt;br&gt;
&lt;strong&gt;The "Sliding Window" pattern&lt;/strong&gt; solves substring/subarray problems.&lt;br&gt;
&lt;strong&gt;The "Fast &amp;amp; Slow Pointers" pattern&lt;/strong&gt; finds cycles AND middle elements.&lt;br&gt;
&lt;strong&gt;The "Backtracking" pattern&lt;/strong&gt; generates all combinations or permutations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One pattern. Multiple problems.&lt;/strong&gt; That's the difference between grinding and actually understanding.&lt;/p&gt;

&lt;h2&gt;
  
  
  The guide covers:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Big-O notation&lt;/strong&gt; and why interviewers care about it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Arrays, Linked Lists, Stacks, and Queues&lt;/strong&gt; with real code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trees and Graphs&lt;/strong&gt; (including the classic "Number of Islands")&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;8 coding patterns&lt;/strong&gt; that map to most interview problems&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic Programming&lt;/strong&gt; broken down simply (starting with Climbing Stairs)&lt;/li&gt;
&lt;li&gt;The most common mistakes candidates make (and how to avoid them)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick example: Two Sum in O(n)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;two_sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;seen&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;enumerate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;complement&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;complement&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;seen&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;seen&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;complement&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;seen&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No nested loops. Just one hash map and a single pass. &lt;strong&gt;That's what learning patterns looks like.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;If Dynamic Programming always felt impossible, &lt;strong&gt;start with Q42 in the guide.&lt;/strong&gt; It clicks when you see it as just Fibonacci with a twist.&lt;/p&gt;

&lt;p&gt;👉 Full guide (free, no login needed): &lt;a href="https://devencyclopedia.com/blog/dsa-interview-questions" rel="noopener noreferrer"&gt;50 DSA Interview Questions and Answers&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Save this for your next interview prep session.&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  dsa #interviews #programming #algorithms #python #javascript #webdev #career
&lt;/h1&gt;

</description>
      <category>dsa</category>
      <category>interview</category>
      <category>programming</category>
      <category>algorithms</category>
    </item>
    <item>
      <title>Your App Crashed. The Log Says '137'. What Does That Even Mean?</title>
      <dc:creator>Dev Encyclopedia</dc:creator>
      <pubDate>Tue, 30 Jun 2026 02:08:14 +0000</pubDate>
      <link>https://dev.to/dev_encyclopedia/your-app-crashed-the-log-says-137-what-does-that-even-mean-5h1f</link>
      <guid>https://dev.to/dev_encyclopedia/your-app-crashed-the-log-says-137-what-does-that-even-mean-5h1f</guid>
      <description>&lt;p&gt;Imagine this.&lt;/p&gt;

&lt;p&gt;It is 3 AM. Your app is down. Your phone is buzzing. And the only clue you have is this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Exit Code: 137
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No explanation. No hint. Just a number staring back at you.&lt;/p&gt;

&lt;p&gt;This happens to developers every single day. And every time, the process is the same:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Google the error code&lt;/li&gt;
&lt;li&gt;Land on a 5,000 word documentation page&lt;/li&gt;
&lt;li&gt;Read half of it&lt;/li&gt;
&lt;li&gt;Still not sure what caused it&lt;/li&gt;
&lt;li&gt;Try something random&lt;/li&gt;
&lt;li&gt;Hope it works&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That whole process can take 30 minutes or more. For a number. For one number.&lt;/p&gt;




&lt;h2&gt;
  
  
  So what does 137 actually mean?
&lt;/h2&gt;

&lt;p&gt;It means your app ran out of memory.&lt;/p&gt;

&lt;p&gt;The system gave your application a memory limit. Your app crossed it. The system force-killed it immediately. No warning. No graceful shutdown. Just gone.&lt;/p&gt;

&lt;p&gt;That is it. That is the whole explanation.&lt;/p&gt;

&lt;p&gt;But finding that answer used to require knowing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What "exit codes" are&lt;/li&gt;
&lt;li&gt;What "SIGKILL" means&lt;/li&gt;
&lt;li&gt;What "OOMKilled" stands for&lt;/li&gt;
&lt;li&gt;How to run the right terminal command to confirm it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most developers know this eventually. But when you are half asleep at 3 AM staring at a number, you just want a straight answer.&lt;/p&gt;




&lt;h2&gt;
  
  
  I built a tool that gives you that straight answer
&lt;/h2&gt;

&lt;p&gt;It is called &lt;strong&gt;Exit Code Lookup&lt;/strong&gt; and it lives on devEncyclopedia.com.&lt;/p&gt;

&lt;p&gt;Here is how it works:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Type the error code, signal name, or status you see in your logs&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Get a plain-English explanation of what it means&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Get the exact command to confirm and fix it&lt;/p&gt;

&lt;p&gt;That is the whole tool. No signup. No reading. Just paste the code and get the answer.&lt;/p&gt;




&lt;h2&gt;
  
  
  Some examples of what it decodes
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What you type&lt;/th&gt;
&lt;th&gt;What it means (plain English)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;137&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;App ran out of memory and was force-killed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;143&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;App was shut down cleanly during a deployment update&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;127&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The app file could not be found inside the container&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;1&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Something went wrong inside the app itself&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;CrashLoopBackOff&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;App keeps crashing and restarting in a loop&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;OOMKilled&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Out of memory, same root cause as exit code 137&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ImagePullBackOff&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Cannot download the app package to run it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;SIGTERM&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A graceful shutdown signal, usually nothing to worry about&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Why this matters even if you are not a developer
&lt;/h2&gt;

&lt;p&gt;If you manage a team that builds software, or you work alongside developers, you will hear these terms. Now you know what they mean.&lt;/p&gt;

&lt;p&gt;If you are a developer just starting out, bookmarking this tool will save you real time on real incidents.&lt;/p&gt;

&lt;p&gt;If you are experienced, you already know how annoying it is to look these up mid-incident. Having them in one place with diagnostic commands ready to copy is just faster.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try it yourself
&lt;/h2&gt;

&lt;p&gt;Go to: &lt;strong&gt;&lt;a href="https://devencyclopedia.com/tools/exit-code-lookup" rel="noopener noreferrer"&gt;https://devencyclopedia.com/tools/exit-code-lookup&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Type &lt;code&gt;137&lt;/code&gt; and see what comes back.&lt;/p&gt;

&lt;p&gt;Then try &lt;code&gt;CrashLoopBackOff&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The whole point of the tool is that you should understand the result even if you have never touched a server in your life.&lt;/p&gt;

&lt;p&gt;Free. No account needed. Works in your browser.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built by the team at devEncyclopedia.com, a reference site for developers that believes documentation should be readable by humans.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>docker</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Bun 1.3's Built-in SQL and Redis Clients: Do You Still Need pg, mysql2, and ioredis?</title>
      <dc:creator>Dev Encyclopedia</dc:creator>
      <pubDate>Sun, 28 Jun 2026 23:47:34 +0000</pubDate>
      <link>https://dev.to/dev_encyclopedia/bun-13s-built-in-sql-and-redis-clients-do-you-still-need-pg-mysql2-and-ioredis-3g0k</link>
      <guid>https://dev.to/dev_encyclopedia/bun-13s-built-in-sql-and-redis-clients-do-you-still-need-pg-mysql2-and-ioredis-3g0k</guid>
      <description>&lt;p&gt;Bun 1.3 shipped something no other JavaScript runtime has attempted: built-in clients for PostgreSQL, MySQL, SQLite, and Redis. Zero npm dependencies, zero native bindings, zero config files. You write &lt;code&gt;Bun.sql&lt;/code&gt; or &lt;code&gt;Bun.redis&lt;/code&gt; and it works.&lt;/p&gt;

&lt;p&gt;If you've been running &lt;code&gt;pg&lt;/code&gt;, &lt;code&gt;mysql2&lt;/code&gt;, and &lt;code&gt;ioredis&lt;/code&gt; for years, the real question isn't whether this is cool, it's whether these built-ins are actually ready to replace your existing setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changes with Bun.SQL
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;vs pg (PostgreSQL)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No more manual &lt;code&gt;.connect()&lt;/code&gt;, no more &lt;code&gt;.rows&lt;/code&gt; unwrapping, and transactions collapse into a single call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;sql&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;begin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;tx&lt;/span&gt;&lt;span class="s2"&gt;`UPDATE accounts SET balance = balance - &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; WHERE id = &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;fromAccount&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;tx&lt;/span&gt;&lt;span class="s2"&gt;`UPDATE accounts SET balance = balance + &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; WHERE id = &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;toAccount&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="c1"&gt;// Auto-commits on success, auto-rolls back on exception&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;vs mysql2 (MySQL)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The same tagged template syntax works for both Postgres and MySQL. Switch databases and your query code doesn't change, only the connection config does.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;vs ioredis&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Options objects replace positional flag strings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ioredis&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;redis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;val&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;EX&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;NX&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Bun.redis&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;redis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;val&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;ex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;nx&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pub/sub moves from event emitters to async iterators, which fits more naturally with &lt;code&gt;for await...of&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The honest performance take
&lt;/h2&gt;

&lt;p&gt;Bun's own benchmarks claim up to 7.9x throughput over ioredis. In synthetic tight-loop tests, sure. In a real app with network latency and business logic between calls, expect something closer to 10 to 30 percent improvement. Real, but not a reason to migrate on its own.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's actually missing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;No Redis Cluster support yet&lt;/li&gt;
&lt;li&gt;No Lua scripting on Bun.redis&lt;/li&gt;
&lt;li&gt;No Sentinel support&lt;/li&gt;
&lt;li&gt;MySQL mode lacks prepared statement caching&lt;/li&gt;
&lt;li&gt;If you need to run on Node.js too, the npm packages remain your only option&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Should you migrate now?
&lt;/h2&gt;

&lt;p&gt;If you're starting fresh on Bun with simple CRUD and basic Redis usage, probably yes. If you depend on Redis Cluster, Lua scripts, or an ORM without Bun.SQL adapter support (Prisma and TypeORM don't have one yet), wait.&lt;/p&gt;

&lt;p&gt;Full side-by-side code comparisons, a complete migration decision framework, and a dev/prod database-switching pattern are in the full post:&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://devencyclopedia.com/blog/bun-sql-redis-clients" rel="noopener noreferrer"&gt;https://devencyclopedia.com/blog/bun-sql-redis-clients&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to convert your existing pg/mysql2/ioredis code automatically, I also built a &lt;a href="https://devencyclopedia.com/tools/bun-snippet-converter" rel="noopener noreferrer"&gt;Bun Snippet Converter&lt;/a&gt; that runs entirely client-side.&lt;/p&gt;

</description>
      <category>bunjs</category>
      <category>javascript</category>
      <category>redis</category>
      <category>postgres</category>
    </item>
  </channel>
</rss>
