@ruvyxa/adapter-bun
v1.1.5
Published
Run Ruvyxa on Bun-flavored hosts with typed adapter metadata for entrypoints and assets.
Maintainers
Readme
Install
npm install @ruvyxa/adapter-bunUsage
import { config } from 'ruvyxa/config'
import { bun } from '@ruvyxa/adapter-bun'
export default config({
adapter: bun(),
})Deployment Artifact
{
"name": "bun",
"target": "node",
"platform": "bun",
"entry": ".ruvyxa/server/app",
"assetsDir": ".ruvyxa/assets",
"clientDir": ".ruvyxa/client",
"chunkManifest": ".ruvyxa/client/chunk-manifest.json"
}ruvyxa build creates a self-contained server. Run it without the Ruvyxa CLI:
bun .ruvyxa/deploy/bun/server/index.mjsThe generated server streams SSR/API response bodies and honors PORT and HOST.
Client identity behind a proxy
The generated server believes X-Forwarded-For and X-Real-IP only from a connection whose peer is
loopback or listed in security.trustedProxyIps. From any other peer both headers are dropped
before the request is routed, because nothing in front of the server overwrote them and one caller
rotating a value would otherwise collect a fresh bucket per request from the built-in rate
middleware, the server-action rate limiter, and the action replay quota.
Behind a reverse proxy that is not on the same host — nginx or Traefik in another container, an ingress controller, a service mesh — list its address or range, or every visitor is counted as one client:
export default config({
security: { trustedProxyIps: ['10.0.0.0/8'] },
})