Zum Inhalt springen
GigadriveDocs

Remix

What Gigadrive Network detects in a Remix project, what the preset expects on disk, and how to point it at your own server file.

Gigadrive Network detects Remix from @remix-run/dev in package.json and expects the output layout the Remix Vite plugin produces. A project that has moved to React Router v7 no longer carries that package, so this preset does not apply to it.

What the preset configures

SettingValue
Runtimenode-22
Memory256 MB
Maximum duration30 seconds
Functionbuild/server/index.js, serving /*
Assets directorybuild/client
EnvironmentNODE_ENV=production

The preset walks build/client after the build and publishes every file inside it, so the client bundle reaches the edge with no configuration of your own.

Declaring your own server

Most Remix projects run their server build through a small host file, and the Function loads that file. Point at it with a gigadrive.yaml at the project root. Each section of the file replaces the matching part of the preset outright, so declaring an entrypoint means restating the route and the asset directory as well:

version: 4

functions:
  server.js:
    runtime: node-22
    memory: 256
    max_duration: 30

routes:
  - source: /*
    destination: /server.js

assets: build/client

The file you name has to exist once the build has run, or the deployment stops before packaging with a message naming it. Configuration documents the remaining keys, and Frameworks explains how the merge works section by section.

Remix documents its Vite build output and server adapters at remix.run/docs.