-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathalchemy.run.ts
More file actions
41 lines (35 loc) · 903 Bytes
/
alchemy.run.ts
File metadata and controls
41 lines (35 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import alchemy from "alchemy";
import { KVNamespace, Redwood, WranglerJson } from "alchemy/cloudflare";
const app = await alchemy("oscar-gabriel-dev");
const repoCache = await KVNamespace("github-repo-cache", {
title: "github-repo-cache",
});
export const worker = await Redwood("redwood-app", {
name: `${app.name}-site`,
entrypoint: "./dist/worker/index.js",
adopt: true,
compatibility: "node",
compatibilityDate: "2025-08-21",
bindings: {
REPO_CACHE: repoCache,
GITHUB_TOKEN: alchemy.secret.env.GITHUB_TOKEN,
GITHUB_USER_AGENT: alchemy.secret.env.GITHUB_USER_AGENT,
},
domains: [
{
domainName: alchemy.env.CUSTOM_DOMAIN,
zoneId: alchemy.env.CLOUDFLARE_ZONE_ID,
adopt: true,
},
],
});
if (app.stage === "prod") {
await WranglerJson({
worker,
path: "wrangler.jsonc",
});
console.log({
url: `https://${alchemy.env.CUSTOM_DOMAIN}`,
});
}
await app.finalize();