.repos/alchemy-effect/examples/aws-website-nuxt
| Name | Last commit message | Last commit date |
|---|---|---|
| .. | ||
README.md
AWS Website: Nuxt#
Deploys a Nuxt app to AWS with AWS.Website.Nuxt β no nitro.preset edits, no CDK.
The resource builds the app through the project's own @nuxt/kit with nitro's aws-lambda preset (your nuxt.config.ts loads natively), deploys the nitro server bundle on a streaming Lambda Function URL, and serves client assets + prerendered pages from S3 behind CloudFront. Values passed via env are exposed to server routes and SSR through process.env.
const site = yield* AWS.Website.Nuxt("NuxtSite", {
env: {
GREETING: "Hello from Nuxt on AWS!",
},
});
Commands#
bun alchemy deploy # build + deploy
bun alchemy dev # Nuxt's own dev server (nitro dev, HMR)
bun alchemy destroy # tear down
Notes#
@alchemy.run/frontend-frameworksmust be installed in the project β the server's source provider is loaded from its/nuxtexport at deploy time.- Unchanged projects skip the build and deploy entirely (the project tree is content-hashed, respecting
.gitignore). - In
alchemy dev, the site is Nuxt's own dev server (native HMR) and no AWS resources are created; wrap the site inAlchemy.remote()to deploy the real infrastructure even during dev. - Nitro's
isrroute rule is Vercel/Netlify-only and ignored on AWS Lambda β useprerender(as/aboutdoes here) orcacheroute rules instead. test/integ.test.tsdeploys the stack and asserts SSR, the API route, the prerendered page, and static assets over HTTP.