@flightdev/adapter-bun
v0.0.7
Published
Bun adapter for Flight Framework - ultra-fast Bun runtime
Maintainers
Readme
@flightdev/adapter-bun
Bun runtime deployment adapter for Flight Framework. Ultra-fast builds and runtime performance.
Table of Contents
Installation
bun add @flightdev/adapter-bunQuick Start
// flight.config.ts
import { defineConfig } from '@flightdev/core';
import bun from '@flightdev/adapter-bun';
export default defineConfig({
adapter: bun(),
});Build and run:
bun run build
bun .output/server/index.tsConfiguration
bun({
// Host to bind
host: '0.0.0.0',
// Port to listen on
port: 3000,
// Enable compression
compression: true,
// Development mode features
development: process.env.NODE_ENV !== 'production',
});Build Output
.output/
├── server/
│ ├── index.ts # Server entry (Bun-native)
│ └── chunks/ # Code-split chunks
└── client/
└── assets/ # Static filesRunning in Production
# Build
bun run build
# Start
bun .output/server/index.ts
# With environment variables
PORT=8080 bun .output/server/index.tsDocker
FROM oven/bun:1 AS builder
WORKDIR /app
COPY package.json bun.lockb ./
RUN bun install --frozen-lockfile
COPY . .
RUN bun run build
FROM oven/bun:1-slim
WORKDIR /app
COPY --from=builder /app/.output .output
EXPOSE 3000
CMD ["bun", ".output/server/index.ts"]License
MIT
