# Running Node-RED under Bun instead of Node.js

**URL:** <https://discourse.nodered.org/t/running-node-red-under-bun-instead-of-node-js/95611>\
**Category:** General\
**Tags:** uibuilder\
**Created:** [24 February 2025 15:38 UTC](https://discourse.nodered.org/t/running-node-red-under-bun-instead-of-node-js/95611 "2025-02-24T15:38:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [24 February 2025 15:38 UTC](https://discourse.nodered.org/t/running-node-red-under-bun-instead-of-node-js/95611/1 "2025-02-24T15:38:45Z")

</div>

For information, just catching up with what's happening in the world of Bun - the alternative JavaScript server that is meant to be node.js compatible but with some significant upgrades and improvements.

They released v1.2 not long back but today was my first chance to give it a go.

Impressive. I'm running a clean dev version of Node-RED using Bun, all seems to be working. At least UIBUILDER and the SQLite nodes all seem to be working anyway.

---

<div class="post-metadata">

**Author:** ![ziga](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ziga/32/98138_2.png) [@ziga](https://discourse.nodered.org/u/ziga)\
**Post date:** [24 February 2025 18:04 UTC](https://discourse.nodered.org/t/running-node-red-under-bun-instead-of-node-js/95611/2 "2025-02-24T18:04:54Z")

</div>

What are the benefits of Bun?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [24 February 2025 18:12 UTC](https://discourse.nodered.org/t/running-node-red-under-bun-instead-of-node-js/95611/3 "2025-02-24T18:12:44Z")

</div>

These are some of the stated benefits:

### Performance

- **Much Faster Startup & Execution** : Bun is written in Zig and optimized for performance, often running JavaScript and TypeScript significantly faster than Node.js.

- **Faster Package Manager** : `bun install` is much quicker than `npm` or `pnpm` since it fetches and installs dependencies in parallel.

### Built-in Features

- **Bundler, Transpiler, & Runtime in One** : No need for additional tools like Webpack, Babel, or esbuild—Bun handles bundling and transpiling out of the box.
- **Native TypeScript Support** : Runs `.ts` files directly without requiring `ts-node` or manual compilation.
- **Web APIs Support** : Provides built-in support for `fetch`, `WebSockets`, and `ReadableStream`, making it more browser-like.
- **Integrated CommonJS/ESM** : You can use both.
- **New standard libraries** : Built-in support for SQLite & Postgres, soon for MySQL. Some others too such as built-in UDP.

### Simpler & More Efficient

- **Better FS & Network Handling** : Bun uses optimized system calls for file and network operations, reducing overhead.
- **Native JSX/React Support** : Handles JSX transformation without extra dependencies.
- **Unified API** : Includes a built-in test runner, SQLite database driver, and more, reducing dependency bloat.

I'm sure there is more, this is a quick view.

---

<div class="post-metadata">

**Author:** ![softy2k](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/softy2k/32/23707_2.png) [@softy2k](https://discourse.nodered.org/u/softy2k)\
**Post date:** [25 February 2025 08:22 UTC](https://discourse.nodered.org/t/running-node-red-under-bun-instead-of-node-js/95611/4 "2025-02-25T08:22:19Z")

</div>

Just a small info update, **NodeJS 22** includes browser-compatible implementation of WebSocket.

More details: [Node.js — Node.js 22 is now available!](https://nodejs.org/en/blog/announcements/v22-release-announce)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [26 May 2025 08:23 UTC](https://discourse.nodered.org/t/running-node-red-under-bun-instead-of-node-js/95611/5 "2025-05-26T08:23:08Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
