网页
综合
更新时间 2026-11-14 03:58:50
Guides | Bun Guides
自动蜘蛛
bun.sh
正文约 6000 字
Skip to contentDocsGuidesReferenceBlogSearch guides, docs, APIs…/InstallHomeDocsGuidesReferenceBlogInstall Bun v1.4.4RuntimePackage ManagerBundlerCompilerTest RunnerLinterFormatterGuidesReferenceBlogFeedbackBrowse guidesGuidesOverviewGuidesDeploymentDeploy on VercelDeploy on RailwayDeploy on RenderDeploy on AWS LambdaDeploy on DigitalOceanDeploy on Google Cloud RunRuntime & DebuggingTypeScript typesRe-map import pathsVS Code debuggerWeb debuggerHeap snapshotsBuild-time constantsDefine constantsGitHub ActionsCodesign on macOSUtilitiesUpgrade BunDetect BunGet Bun versionHash passwordGenerate UUIDBase64 encodingGzip compressionDEFLATE compressionEscape HTMLDeep equalitySleepFile URL to pathPath to file URLFind executable pathimport.meta.dirimport.meta.fileimport.meta.pathCheck entrypointGet entrypoint pathEcosystem & FrameworksAstro with BunDiscord.js with BunDocker with BunDrizzle with BunGel with BunElysia with BunExpress with BunHono with BunMongoose with BunNeon Drizzle with BunNeon Serverless Postgres with BunNext.js with BunNuxt with BunPM2 with BunPrisma ORM with BunPrisma Postgres with BunQwik with BunReact with BunRemix with BunTanStack Start with BunSentry with BunSolidStart with BunSSR React with BunSvelteKit with Bunsystemd with BunVite with BunUpstash with BunHTTP & NetworkingHTTP Server with BunSimple HTTP Server with BunFetch with BunHot reload an HTTP serverStart a cluster of HTTP serversConfigure TLSProxy HTTP requests using fetch()Stream file responseUpload files via HTTP using FormDataFetch with unix domain socketsStream with iteratorsServer-Sent EventsStream with Node.jsWebSocketSimple serverPub-sub serverContextual dataEnable compressionProcesses & SystemSpawn child processRead stdoutRead stderrParse command-line argumentsRead from stdinSpawn a child process and communicate using IPCListen for CTRL+COS signalsProcess uptimeRun shell commandSet time zoneSet env variablesRead env variablesPackage ManagerAdd a dependencyAdd a dev dependencyAdd an optional dependencyAdd a peer dependencyAdd a Git dependencyAdd a tarball dependencyInstall with aliasWorkspaces with BunOverride the default npm registryConfigure a scoped registryAzure Artifacts with BunJFrog Artifactory with BunAdd a trusted dependencyGenerate a yarn-compatible lockfileMigrate from npm to bunConfigure git to diff Bun's lockfileInstall Bun in GitHub ActionsTest RunnerRun testsWatch modeMigrate from JestMock functionsSpy on methodsMock system timeSnapshot testingUpdate snapshotsCoverage reportsCoverage thresholdConcurrent test globSkip testsTodo testsTest timeoutBail earlyRe-run testsTesting LibraryDOM testsTest SvelteLinter & FormatterMigrate from ESLintMigrate from oxlintMigrate from PrettierMigrate from oxfmtRuntime & DebuggingVS Code debuggerWeb debuggerHeap snapshotsBuild-time constantsDefine constantsGitHub ActionsCodesign on macOSModule SystemImport JSONImport TOMLImport YAMLImport JSON5Import XMLImport HTMLimport.meta.dirimport.meta.fileimport.meta.pathCheck entrypointGet entrypoint pathFile SystemRead as stringRead to BufferRead to Uint8ArrayRead to ArrayBufferRead JSON fileGet MIME typeCheck file existsWatch directoryRead as streamWrite string to fileWrite BlobWrite ResponseAppend to fileIncremental writeWrite streamWrite to stdoutWrite file to stdoutCopy fileDelete fileDelete filesDelete directoriesUtilitiesHash passwordGenerate UUIDBase64 encodingGzip compressionDEFLATE compressionEscape HTMLDeep equalitySleepFile URL to pathPath to file URLFind executable pathHTML ProcessingExtract links using HTMLRewriterOpenGraph tagsBinary DataArrayBuffer to stringArrayBuffer to BufferArrayBuffer to BlobArrayBuffer to ArrayArrayBuffer to Uint8ArrayBuffer to stringBuffer to ArrayBufferBuffer to BlobBuffer to Uint8ArrayBuffer to ReadableStreamBlob to stringBlob to ArrayBufferBlob to Uint8ArrayBlob to DataViewBlob to ReadableStreamUint8Array to stringUint8Array to ArrayBufferUint8Array to BufferUint8Array to BlobUint8Array to DataViewUint8Array to ReadableStreamDataView to stringStreamsStream to stringStream to JSONStream to BlobStream to BufferStream to ArrayBufferStream to Uint8ArrayStream to arrayReadable to stringReadable to JSONReadable to BlobReadable to Uint8ArrayReadable to ArrayBufferGuides›OverviewCopy pageGuidesCode samples and walkthroughs for common tasks with BunFeaturedUse Tanstack Start with BunUse Next.js with BunBuild a frontend using Vite and BunInstall TypeScript declarations for BunWrite a simple HTTP serverBuild a simple WebSocket serverDeploymentDeploy Bun on VercelDeploy Bun on RailwayDeploy Bun on RenderBinary dataConvert an ArrayBuffer to an array of numbersConvert an ArrayBuffer to a BlobConvert an ArrayBuffer to a BufferConvert an ArrayBuffer to a stringConvert an ArrayBuffer to a Uint8ArrayConvert a Blob to an ArrayBufferConvert a Blob to a DataViewConvert a Blob to a ReadableStreamConvert a Blob to a stringConvert a Blob to a Uint8ArrayConvert a Buffer to an ArrayBufferConvert a Buffer to a blobConvert a Buffer to a ReadableStreamConvert a Buffer to a stringConvert a Buffer to a Uint8ArrayConvert a DataView to a stringConvert a Uint8Array to an ArrayBufferConvert a Uint8Array to a BlobConvert a Uint8Array to a BufferConvert a Uint8Array to a DataViewConvert a Uint8Array to a ReadableStreamConvert a Uint8Array to a stringEcosystemUse Gel with BunUse Prisma ORM with BunUse Prisma Postgres with BunCreate a Discord botAdd Sentry to a Bun appUse Drizzle ORM with BunBuild a React app with BunRun Bun as a daemon with PM2Build an app with Nuxt and BunBuild an app with Qwik and BunBuild an app with Astro and BunBuild an app with Remix and BunUse TanStack Start with BunRun Bun as a daemon with systemdBuild an app with Next.js and BunBuild an app with SvelteKit and BunBuild a frontend using Vite and BunBuild an app with SolidStart and BunUse Neon Postgres through Drizzle ORMBuild an HTTP server using Hono and BunUse Neon's Serverless Postgres with BunBuild an HTTP server using Elysia and BunContain
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。