# Bun > ## Documentation Index ## Pages - [Add a development dependency](add-dev.md): ## Documentation Index - [Add a Git dependency](add-git.md): ## Documentation Index - [Add an optional dependency](add-optional.md): ## Documentation Index - [Add a peer dependency](add-peer.md): ## Documentation Index - [Add a tarball dependency](add-tarball.md): ## Documentation Index - [Add a dependency](add.md): ## Documentation Index - [Append content to a file](append.md): ## Documentation Index - [Archive](archive.md): ## Documentation Index - [Parse command-line arguments](argv.md): ## Documentation Index - [Convert an ArrayBuffer to an array of numbers](arraybuffer-to-array.md): ## Documentation Index - [Convert an ArrayBuffer to a Blob](arraybuffer-to-blob.md): ## Documentation Index - [Convert an ArrayBuffer to a Buffer](arraybuffer-to-buffer.md): ## Documentation Index - [Convert an ArrayBuffer to a string](arraybuffer-to-string.md): ## Documentation Index - [Convert an ArrayBuffer to a Uint8Array](arraybuffer-to-typedarray.md): ## Documentation Index - [Read a file to an ArrayBuffer](arraybuffer.md): ## Documentation Index - [Build an app with Astro and Bun](astro.md): ## Documentation Index - [bun audit](audit.md): ## Documentation Index - [Auto-install](auto-install.md): ## Documentation Index - [Deploy a Bun application on AWS Lambda](aws-lambda.md): ## Documentation Index - [Using bun install with an Azure Artifacts npm registry](azure-artifacts.md): ## Documentation Index - [Bail early with the Bun test runner](bail.md): ## Documentation Index - [Encode and decode base64 strings](base64.md): ## Documentation Index - [Write a string to a file](basic.md): ## Documentation Index - [Benchmarking](benchmarking.md): ## Documentation Index - [Binary Data](binary-data.md): ## Documentation Index - [Bindgen](bindgen.md): ## Documentation Index - [Convert a Blob to an ArrayBuffer](blob-to-arraybuffer.md): ## Documentation Index - [Convert a Blob to a DataView](blob-to-dataview.md): ## Documentation Index - [Convert a Blob to a ReadableStream](blob-to-stream.md): ## Documentation Index - [Convert a Blob to a string](blob-to-string.md): ## Documentation Index - [Convert a Blob to a Uint8Array](blob-to-typedarray.md): ## Documentation Index - [Write a Blob to a file](blob.md): ## Documentation Index - [Convert a Buffer to an ArrayBuffer](buffer-to-arraybuffer.md): ## Documentation Index - [Convert a Buffer to a blob](buffer-to-blob.md): ## Documentation Index - [Convert a Buffer to a ReadableStream](buffer-to-readablestream.md): ## Documentation Index - [Convert a Buffer to a string](buffer-to-string.md): ## Documentation Index - [Convert a Buffer to a Uint8Array](buffer-to-typedarray.md): ## Documentation Index - [Read a file to a Buffer](buffer.md): ## Documentation Index - [Build-time constants with --define](build-time-constants.md): ## Documentation Index - [Building Windows](building-windows.md): ## Documentation Index - [Bun APIs](bun-apis.md): ## Documentation Index - [bunfig.toml](bunfig.md): ## Documentation Index - [bunx](bunx.md): ## Documentation Index - [Bytecode Caching](bytecode.md): ## Documentation Index - [C Compiler](c-compiler.md): ## Documentation Index - [Write a file to stdout](cat.md): ## Documentation Index - [Catalogs](catalogs.md): ## Documentation Index - [Spawn](child-process.md): ## Documentation Index - [Install dependencies with Bun in GitHub Actions](cicd.md): ## Documentation Index - [Start a cluster of HTTP servers](cluster.md): ## Documentation Index - [Code coverage](code-coverage.md): ## Documentation Index - [Codesign a single-file JavaScript executable on macOS](codesign-macos-executable.md): ## Documentation Index - [Color](color.md): ## Documentation Index - [Enable compression for WebSocket messages](compression.md): ## Documentation Index - [Selectively run tests concurrently with glob patterns](concurrent-test-glob.md): ## Documentation Index - [Test configuration](configuration.md): ## Documentation Index - [Console](console.md): ## Documentation Index - [Set per-socket contextual data on a WebSocket](context.md): ## Documentation Index - [Contributing](contributing.md): ## Documentation Index - [Cookies](cookies.md): ## Documentation Index - [Set a code coverage threshold with the Bun test runner](coverage-threshold.md): ## Documentation Index - [Generate code coverage reports with the Bun test runner](coverage.md): ## Documentation Index - [bun create](create.md): ## Documentation Index - [CSS](css.md): ## Documentation Index - [Listen for CTRL+C](ctrl-c.md): ## Documentation Index - [Override the default npm registry for bun install](custom-registry.md): ## Documentation Index - [Convert a DataView to a string](dataview-to-string.md): ## Documentation Index - [Dates and times](dates-times.md): ## Documentation Index - [Debugging](debugger.md): ## Documentation Index - [Check if two objects are deeply equal](deep-equals.md): ## Documentation Index - [Define and replace static globals & constants](define-constant.md): ## Documentation Index - [Compress and decompress data with DEFLATE](deflate.md): ## Documentation Index - [Delete directories](delete-directory.md): ## Documentation Index - [Delete files](delete-file.md): ## Documentation Index - [Detect when code is executed with Bun](detect-bun.md): ## Documentation Index - [Deploy a Bun application on DigitalOcean](digital-ocean.md): ## Documentation Index - [Create a Discord bot](discordjs.md): ## Documentation Index - [Finding tests](discovery.md): ## Documentation Index - [DNS](dns.md): ## Documentation Index - [Containerize a Bun application with Docker](docker.md): ## Documentation Index - [DOM testing](dom.md): ## Documentation Index - [Use Drizzle ORM with Bun](drizzle.md): ## Documentation Index - [Build an HTTP server using Elysia and Bun](elysia.md): ## Documentation Index - [Check if the current file is the entrypoint](entrypoint.md): ## Documentation Index - [Environment Variables](environment-variables.md): ## Documentation Index - [Error Handling](error-handling.md): ## Documentation Index - [esbuild](esbuild.md): ## Documentation Index - [Escape an HTML string](escape-html.md): ## Documentation Index - [Single-file executable](executables.md): ## Documentation Index - [Check if a file exists](exists.md): ## Documentation Index - [Build an HTTP server using Express and Bun](express.md): ## Documentation Index - [Extract links from a webpage using HTMLRewriter](extract-links.md): ## Documentation Index - [Extract social share images and Open Graph tags](extract-social-meta.md): ## Documentation Index - [Feedback](feedback.md): ## Documentation Index - [fetch with unix domain sockets in Bun](fetch-unix.md): ## Documentation Index - [Send an HTTP request using fetch](fetch.md): ## Documentation Index - [FFI](ffi.md): ## Documentation Index - [Copy a file to another location](file-cp.md): ## Documentation Index - [File I/O](file-io.md): ## Documentation Index - [File System Router](file-system-router.md): ## Documentation Index - [File Types](file-types.md): ## Documentation Index - [Convert a file URL to an absolute path](file-url-to-path.md): ## Documentation Index - [Write a file incrementally](filesink.md): ## Documentation Index - [bun --filter](filter.md): ## Documentation Index - [Migrate from npm install to bun install](from-npm-install-to-bun-install.md): ## Documentation Index - [Fullstack dev server](fullstack.md): ## Documentation Index - [Use Gel with Bun](gel.md): ## Documentation Index - [Configure git to diff Bun's lockb lockfile](git-diff-bun-lockfile.md): ## Documentation Index - [Glob](glob.md): ## Documentation Index - [Global cache](global-cache.md): ## Documentation Index - [Globals](globals.md): ## Documentation Index - [Deploy a Bun application on Google Cloud Run](google-cloud-run.md): ## Documentation Index - [Compress and decompress data with gzip](gzip.md): ## Documentation Index - [Write browser DOM tests with Bun and happy-dom](happy-dom.md): ## Documentation Index - [Hash a password](hash-a-password.md): ## Documentation Index - [Hashing](hashing.md): ## Documentation Index - [Inspect memory usage using V8 heap snapshots](heap-snapshot.md): ## Documentation Index - [Build an HTTP server using Hono and Bun](hono.md): ## Documentation Index - [Hot reloading](hot-reloading.md): ## Documentation Index - [Hot reload an HTTP server](hot.md): ## Documentation Index - [Import a JSON file](import-json.md): ## Documentation Index - [Import a JSON5 file](import-json5.md): ## Documentation Index - [Get the directory of the current file](import-meta-dir.md): ## Documentation Index - [Get the file name of the current file](import-meta-file.md): ## Documentation Index - [Get the absolute path of the current file](import-meta-path.md): ## Documentation Index - [Import a TOML file](import-toml.md): ## Documentation Index - [Import a YAML file](import-yaml.md): ## Documentation Index - [Bundler](index.md): ## Documentation Index - [bun info](info.md): ## Documentation Index - [bun init](init.md): ## Documentation Index - [bun install](install.md): ## Documentation Index - [Installation](installation.md): ## Documentation Index - [Spawn a child process and communicate using IPC](ipc.md): ## Documentation Index - [Isolated installs](isolated-installs.md): ## Documentation Index - [Generate a UUID](javascript-uuid.md): ## Documentation Index - [Using bun install with Artifactory](jfrog-artifactory.md): ## Documentation Index - [Read a JSON file](json.md): ## Documentation Index - [JSON5](json5.md): ## Documentation Index - [JSONL](jsonl.md): ## Documentation Index - [JSX](jsx.md): ## Documentation Index - [License](license.md): ## Documentation Index - [Lifecycle scripts](lifecycle.md): ## Documentation Index - [bun link](link.md): ## Documentation Index - [Loaders](loaders.md): ## Documentation Index - [Lockfile](lockfile.md): ## Documentation Index - [Macros](macros.md): ## Documentation Index - [Get the absolute path to the current entrypoint](main.md): ## Documentation Index - [Metrics](metrics.md): ## Documentation Index - [Migrate from Jest to Bun's test runner](migrate-from-jest.md): ## Documentation Index - [Get the MIME type of a file](mime.md): ## Documentation Index - [null](minifier.md): ## Documentation Index - [Set the system time in Bun's test runner](mock-clock.md): ## Documentation Index - [Mock functions in `bun test`](mock-functions.md): ## Documentation Index - [Mocks](mocks.md): ## Documentation Index - [Module Resolution](module-resolution.md): ## Documentation Index - [Read and write data to MongoDB using Mongoose and Bun](mongoose.md): ## Documentation Index - [Get the process uptime in nanoseconds](nanoseconds.md): ## Documentation Index - [Use Neon Postgres through Drizzle ORM](neon-drizzle.md): ## Documentation Index - [Use Neon's Serverless Postgres with Bun](neon-serverless-postgres.md): ## Documentation Index - [Build an app with Next.js and Bun](nextjs.md): ## Documentation Index - [Node-API](node-api.md): ## Documentation Index - [Convert a Node.js Readable to an ArrayBuffer](node-readable-to-arraybuffer.md): ## Documentation Index - [Convert a Node.js Readable to a Blob](node-readable-to-blob.md): ## Documentation Index - [Convert a Node.js Readable to JSON](node-readable-to-json.md): ## Documentation Index - [Convert a Node.js Readable to a string](node-readable-to-string.md): ## Documentation Index - [Convert a Node.js Readable to an Uint8Array](node-readable-to-uint8array.md): ## Documentation Index - [Node.js Compatibility](nodejs-compat.md): ## Documentation Index - [Install a package under a different name](npm-alias.md): ## Documentation Index - [.npmrc support](npmrc.md): ## Documentation Index - [Build an app with Nuxt and Bun](nuxt.md): ## Documentation Index - [Listen to OS signals](os-signals.md): ## Documentation Index - [bun outdated](outdated.md): ## Documentation Index - [Overrides and resolutions](overrides.md): ## Documentation Index - [bun patch](patch.md): ## Documentation Index - [Convert an absolute path to a file URL](path-to-file-url.md): ## Documentation Index - [Plugins](plugins.md): ## Documentation Index - [bun pm](pm.md): ## Documentation Index - [Run Bun as a daemon with PM2](pm2.md): ## Documentation Index - [Use Prisma Postgres with Bun](prisma-postgres.md): ## Documentation Index - [Use Prisma with Bun](prisma.md): ## Documentation Index - [Proxy HTTP requests using fetch()](proxy.md): ## Documentation Index - [bun publish](publish.md): ## Documentation Index - [Build a publish-subscribe WebSocket server](pubsub.md): ## Documentation Index - [Quickstart](quickstart.md): ## Documentation Index - [Build an app with Qwik and Bun](qwik.md): ## Documentation Index - [Deploy a Bun application on Railway](railway.md): ## Documentation Index - [Build a React app with Bun](react.md): ## Documentation Index - [Read environment variables](read-env.md): ## Documentation Index - [Redis](redis.md): ## Documentation Index - [Configure a private registry for an organization scope with bun install](registry-scope.md): ## Documentation Index - [Build an app with Remix and Bun](remix.md): ## Documentation Index - [bun remove](remove.md): ## Documentation Index - [Deploy a Bun application on Render](render.md): ## Documentation Index - [Test Reporters](reporters.md): ## Documentation Index - [Re-run tests multiple times with the Bun test runner](rerun-each.md): ## Documentation Index - [Write a Response to a file](response.md): ## Documentation Index - [Roadmap](roadmap.md): ## Documentation Index - [Routing](routing.md): ## Documentation Index - [Run your tests with the Bun test runner](run-tests.md): ## Documentation Index - [Runtime behavior](runtime-behavior.md): ## Documentation Index - [S3](s3.md): ## Documentation Index - [Scopes and registries](scopes-registries.md): ## Documentation Index - [Secrets](secrets.md): ## Documentation Index - [Security Scanner API](security-scanner-api.md): ## Documentation Index - [Semver](semver.md): ## Documentation Index - [Add Sentry to a Bun app](sentry.md): ## Documentation Index - [Common HTTP server usage](server.md): ## Documentation Index - [Set environment variables](set-env.md): ## Documentation Index - [Run a Shell Command](shell.md): ## Documentation Index - [Write a simple HTTP server](simple.md): ## Documentation Index - [Skip tests with the Bun test runner](skip-tests.md): ## Documentation Index - [Sleep for a fixed number of milliseconds](sleep.md): ## Documentation Index - [Use snapshot testing in `bun test`](snapshot.md): ## Documentation Index - [Snapshots](snapshots.md): ## Documentation Index - [Build an app with SolidStart and Bun](solidstart.md): ## Documentation Index - [Read stderr from a child process](spawn-stderr.md): ## Documentation Index - [Read stdout from a child process](spawn-stdout.md): ## Documentation Index - [Spawn a child process](spawn.md): ## Documentation Index - [Spy on methods in `bun test`](spy-on.md): ## Documentation Index - [SQL](sql.md): ## Documentation Index - [SQLite](sqlite.md): ## Documentation Index - [Server-side render (SSR) a React component](ssr-react.md): ## Documentation Index - [Read from stdin](stdin.md): ## Documentation Index - [Write to stdout](stdout.md): ## Documentation Index - [Stream a file as an HTTP Response](stream-file.md): ## Documentation Index - [Streaming HTTP Server with Async Iterators](stream-iterator.md): ## Documentation Index - [Streaming HTTP Server with Node.js Streams](stream-node-streams-in-bun.md): ## Documentation Index - [Read a file as a ReadableStream](stream.md): ## Documentation Index - [Streams](streams.md): ## Documentation Index - [Build an HTTP server using StricJS and Bun](stric.md): ## Documentation Index - [Read a file as a string](string.md): ## Documentation Index - [import, require, and test Svelte components with bun test](svelte-test.md): ## Documentation Index - [Build an app with SvelteKit and Bun](sveltekit.md): ## Documentation Index - [Run Bun as a daemon with systemd](systemd.md): ## Documentation Index - [Use TanStack Start with Bun](tanstack-start.md): ## Documentation Index - [TCP](tcp.md): ## Documentation Index - [Using Testing Library with Bun](testing-library.md): ## Documentation Index - [Set a per-test timeout with the Bun test runner](timeout.md): ## Documentation Index - [Set a time zone in Bun](timezone.md): ## Documentation Index - [Configure TLS on an HTTP server](tls.md): ## Documentation Index - [Convert a ReadableStream to an array of chunks](to-array.md): ## Documentation Index - [Convert a ReadableStream to an ArrayBuffer](to-arraybuffer.md): ## Documentation Index - [Convert a ReadableStream to a Blob](to-blob.md): ## Documentation Index - [Convert a ReadableStream to a Buffer](to-buffer.md): ## Documentation Index - [Convert a ReadableStream to JSON](to-json.md): ## Documentation Index - [Convert a ReadableStream to a string](to-string.md): ## Documentation Index - [Convert a ReadableStream to a Uint8Array](to-typedarray.md): ## Documentation Index - [Mark a test as a "todo" with the Bun test runner](todo-tests.md): ## Documentation Index - [Transpiler](transpiler.md): ## Documentation Index - [Add a trusted dependency](trusted.md): ## Documentation Index - [Re-map import paths](tsconfig-paths.md): ## Documentation Index - [Convert a Uint8Array to an ArrayBuffer](typedarray-to-arraybuffer.md): ## Documentation Index - [Convert a Uint8Array to a Blob](typedarray-to-blob.md): ## Documentation Index - [Convert a Uint8Array to a Buffer](typedarray-to-buffer.md): ## Documentation Index - [Convert a Uint8Array to a DataView](typedarray-to-dataview.md): ## Documentation Index - [Convert a Uint8Array to a ReadableStream](typedarray-to-readablestream.md): ## Documentation Index - [Convert a Uint8Array to a string](typedarray-to-string.md): ## Documentation Index - [Install TypeScript declarations for Bun](typescript.md): ## Documentation Index - [UDP](udp.md): ## Documentation Index - [Read a file to a Uint8Array](uint8array.md): ## Documentation Index - [Delete a file](unlink.md): ## Documentation Index - [Update snapshots in `bun test`](update-snapshots.md): ## Documentation Index - [bun update](update.md): ## Documentation Index - [Upgrade Bun to the latest version](upgrade.md): ## Documentation Index - [Bun Redis with Upstash](upstash.md): ## Documentation Index - [Utils](utils.md): ## Documentation Index - [Deploy a Bun application on Vercel](vercel.md): ## Documentation Index - [Get the current Bun version](version.md): ## Documentation Index - [Build a frontend using Vite and Bun](vite.md): ## Documentation Index - [Debugging Bun with the VS Code extension](vscode-debugger.md): ## Documentation Index - [Run tests in watch mode with Bun](watch-mode.md): ## Documentation Index - [Watch a directory for changes](watch.md): ## Documentation Index - [Web APIs](web-apis.md): ## Documentation Index - [Debugging Bun with the web debugger](web-debugger.md): ## Documentation Index - [WebSockets](websockets.md): ## Documentation Index - [Get the path to an executable bin file](which-path-to-executable-bin.md): ## Documentation Index - [bun why](why.md): ## Documentation Index - [Workers](workers.md): ## Documentation Index - [Configuring a monorepo using workspaces](workspaces.md): ## Documentation Index - [Writing tests](writing-tests.md): ## Documentation Index - [YAML](yaml.md): ## Documentation Index - [Generate a yarn-compatible lockfile](yarnlock.md): ## Documentation Index