Zum Inhalt springen
GigadriveDocs

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.

What the preset configures

SettingValue
Runtimenode-22
Memory256 MB
Maximum duration30 seconds
Functiondist/server/entry.mjs, serving /*
Assets directorydist/client
EnvironmentNODE_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.