mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
add cloudflare workers support (#326)
This commit is contained in:
@@ -17,20 +17,34 @@ export async function getRuntimeChoice(
|
||||
return "node";
|
||||
}
|
||||
|
||||
const runtimeOptions: Array<{
|
||||
value: Runtime;
|
||||
label: string;
|
||||
hint: string;
|
||||
}> = [
|
||||
{
|
||||
value: "bun",
|
||||
label: "Bun",
|
||||
hint: "Fast all-in-one JavaScript runtime",
|
||||
},
|
||||
{
|
||||
value: "node",
|
||||
label: "Node.js",
|
||||
hint: "Traditional Node.js runtime",
|
||||
},
|
||||
];
|
||||
|
||||
if (backend === "hono") {
|
||||
runtimeOptions.push({
|
||||
value: "workers",
|
||||
label: "Cloudflare Workers (beta)",
|
||||
hint: "Edge runtime on Cloudflare's global network",
|
||||
});
|
||||
}
|
||||
|
||||
const response = await select<Runtime>({
|
||||
message: "Select runtime",
|
||||
options: [
|
||||
{
|
||||
value: "bun",
|
||||
label: "Bun",
|
||||
hint: "Fast all-in-one JavaScript runtime",
|
||||
},
|
||||
{
|
||||
value: "node",
|
||||
label: "Node.js",
|
||||
hint: "Traditional Node.js runtime",
|
||||
},
|
||||
],
|
||||
options: runtimeOptions,
|
||||
initialValue: DEFAULT_CONFIG.runtime,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user