t3-code-android-nightly/.repos/alchemy-effect/examples/cloudflare-static-site/alchemy.run.ts
Julius Marminge 108e01746c
Upgrade Effect and Alchemy betas (#4643)
Prepare Relay production infrastructure for the PlanetScale PS_20 HA topology, upgrade Effect and Alchemy to compatible betas, reconcile migration state, and preserve patched MCP session termination behavior.\n\nCo-authored-by: codex <codex@users.noreply.github.com>
2026-07-27 16:21:02 +02:00

29 lines
671 B
TypeScript

import * as Alchemy from "alchemy";
import * as Cloudflare from "alchemy/Cloudflare";
import * as Effect from "effect/Effect";
export default Alchemy.Stack(
"CloudflareStatic",
{
providers: Cloudflare.providers(),
state: Cloudflare.state(),
},
Effect.gen(function* () {
//fix url when no dev command present
const worker = yield* Cloudflare.Website.StaticSite("Website", {
command: "zola build",
dev: {
command: "zola serve",
// url: "http://localhost:1111",
},
outdir: "public",
assets: {
notFoundHandling: "404-page",
},
});
return {
url: worker.url,
};
}),
);