Skip to content

Astro

Source: src/Fly/Website/Astro.ts

Deploy an Astro application to Fly: a Service running the Node adapter’s serve entry (static files first, then the framework handler) on port 3000.

Pages render on demand by default (output: "server"). With astro: { output: "static" } every page is prerendered and the deploy is assets-only.

Basic Astro App

const site = yield* Fly.Website.Astro("Web", {
rootDir: "./app",
});

Custom Domain

const site = yield* Fly.Website.Astro("Web", {
rootDir: "./app",
domain: "app.example.com",
});
const site = yield* Fly.Website.Astro("Docs", {
rootDir: "./docs",
astro: { output: "static" },
assets: { notFoundHandling: "404-page" },
});