Astro Adapter
The Astro Adapter in Kiln turns Astro SSR applications into standalone binaries with native asset extraction and fast server startup.
Supported Versions
Section titled “Supported Versions”- Astro 5.x & Astro 7.x
@astrojs/nodestandalone output- SSR, Hybrid, and Static Prerendered Routes
Configuration
Section titled “Configuration”Install @astrojs/node:
bun add @astrojs/nodebun add -d kiln-compilerIn your astro.config.mjs:
import { defineConfig } from "astro/config";import node from "@astrojs/node";
export default defineConfig({ output: "server", adapter: node({ mode: "standalone" }),});Build & Run
Section titled “Build & Run”In your package.json:
"scripts": { "build": "astro build", "compile": "kiln -o ./bin/app", "build:compile": "astro build && kiln -o ./bin/app"}Compile and run:
bun run build:compile./bin/appThe application will start listening on http://0.0.0.0:4321 (or PORT environment variable).
