Skip to content

Server

Source: src/AWS/Website/Server.ts

The framework toolchain half of an AWS website: on alchemy deploy it runs the framework’s production build with a platform deploy target and tracks the on-disk output in state; on alchemy dev it runs the framework’s OWN dev server (native HMR via the framework’s kit) in the dev sidecar and exposes its local URL.

The framework package and the target module are loaded from your project’s node_modules, so your project’s framework version drives the build. Build inputs are content-hashed so an unchanged project skips the rebuild entirely.

const server = yield* Server("Server", {
framework: "@alchemy.run/frontend-frameworks/nuxt",
target: "@alchemy.run/frontend-frameworks/nuxt/aws",
root: "./app",
});
// deploy: server.serverEntry -> .output/server/index.mjs (Lambda handler)
// server.clientDir -> .output/public (static assets for the CDN)
// dev: server.url -> http://localhost:<port> (framework HMR server)