t3-code-android-nightly/.repos/alchemy-effect/examples/cloudflare-website-nextjs/alchemy.run.ts
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00

34 lines
842 B
TypeScript

import * as Alchemy from "alchemy";
import * as Cloudflare from "alchemy/Cloudflare";
import * as Effect from "effect/Effect";
export default Alchemy.Stack(
"CloudflareWebsiteNextjsExample",
{
providers: Cloudflare.providers(),
state: Cloudflare.state(),
},
Effect.gen(function* () {
const site = yield* Cloudflare.Website.Nextjs("Nextjs", {
// Only hash the files that affect the build, so unchanged sources
// skip the OpenNext build (and the deploy) entirely.
memo: {
include: [
"app/**",
"public/**",
"package.json",
"next.config.mjs",
"postcss.config.mjs",
"tsconfig.json",
],
},
env: {
GREETING: "Hello from Next.js on Cloudflare!",
},
});
return {
url: site.url,
};
}),
);