Astro
What Gigadrive Network detects in an Astro project, why the preset expects a server adapter, and what a static Astro build needs instead.
Gigadrive Network detects Astro from astro in package.json and expects a server build: an
entrypoint at dist/server/entry.mjs and client assets in dist/client. That is the layout Astro
writes once an adapter is configured.
Astro support is experimental
The preset is a set of default paths with no Astro-specific handling behind it, and the defaults assume a server build. Check the Resources tab on your first deployment to confirm the Function that was provisioned is the one you expected.
What the preset configures
| Setting | Value |
|---|---|
| Runtime | node-22 |
| Memory | 256 MB |
| Maximum duration | 30 seconds |
| Function | dist/server/entry.mjs, serving /* |
| Assets directory | dist/client |
| Environment | NODE_ENV=production |
The preset walks dist/client after the build and publishes every file inside it, so the client
assets a server build produces reach the edge with no configuration of your own.
Frameworks covers how a preset resolves its assets directory.
Server builds
Configure the Node adapter in astro.config.mjs so the build produces the server entry the preset
looks for:
import { defineConfig } from 'astro/config';
import node from '@astrojs/node';
export default defineConfig({
output: 'server',
adapter: node({ mode: 'standalone' }),
});Static builds
An Astro build with no adapter writes a static site into dist and produces no server entry. The
preset still expects one, and entrypoints fall back to the preset's whenever your own config declares
none, so a gigadrive.yaml that sets only assets does not rescue it. The deployment stops before
packaging with a message naming the missing file. Configure the Node adapter from the server-build example even for a site
that renders everything at build time.
Astro documents adapters and both output modes at docs.astro.build.
