@agentuity/cli 3.0.0-alpha.1 → 3.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/cmd/project/frameworks.d.ts +13 -13
  2. package/dist/cmd/project/frameworks.d.ts.map +1 -1
  3. package/dist/cmd/project/frameworks.js +26 -21
  4. package/dist/cmd/project/frameworks.js.map +1 -1
  5. package/dist/cmd/project/scaffold.d.ts.map +1 -1
  6. package/dist/cmd/project/scaffold.js +13 -23
  7. package/dist/cmd/project/scaffold.js.map +1 -1
  8. package/dist/cmd/project/template-flow.d.ts.map +1 -1
  9. package/dist/cmd/project/template-flow.js +4 -1
  10. package/dist/cmd/project/template-flow.js.map +1 -1
  11. package/package.json +7 -7
  12. package/src/cmd/project/frameworks.ts +31 -47
  13. package/src/cmd/project/scaffold.ts +14 -26
  14. package/src/cmd/project/template-flow.ts +3 -1
  15. package/src/cmd/project/templates/astro/src/pages/api/translate.ts +22 -0
  16. package/src/cmd/project/templates/astro/src/pages/index.astro +160 -0
  17. package/src/cmd/project/templates/hono/src/index.ts +103 -0
  18. package/src/cmd/project/templates/nextjs/src/app/api/translate/route.ts +19 -0
  19. package/src/cmd/project/templates/nextjs/src/app/globals.css +74 -0
  20. package/src/cmd/project/templates/nextjs/src/app/page.tsx +234 -0
  21. package/src/cmd/project/templates/nuxt/app.vue +191 -0
  22. package/src/cmd/project/templates/nuxt/server/api/translate.post.ts +18 -0
  23. package/src/cmd/project/templates/remix/app/routes/api.translate.ts +24 -0
  24. package/src/cmd/project/templates/remix/app/routes/home.tsx +241 -0
  25. package/src/cmd/project/templates/sveltekit/src/routes/+page.server.ts +24 -0
  26. package/src/cmd/project/templates/sveltekit/src/routes/+page.svelte +204 -0
  27. package/src/cmd/project/templates/vite-react/server.ts +39 -0
  28. package/src/cmd/project/templates/vite-react/src/App.tsx +241 -0
  29. package/src/cmd/project/templates/vite-react/src/index.css +31 -0
  30. package/src/cmd/project/templates/vite-react/src/main.tsx +15 -0
  31. package/dist/cmd/project/frameworks-ai-examples.d.ts +0 -15
  32. package/dist/cmd/project/frameworks-ai-examples.d.ts.map +0 -1
  33. package/dist/cmd/project/frameworks-ai-examples.js +0 -160
  34. package/dist/cmd/project/frameworks-ai-examples.js.map +0 -1
  35. package/dist/cmd/project/frameworks-landing-pages.d.ts +0 -17
  36. package/dist/cmd/project/frameworks-landing-pages.d.ts.map +0 -1
  37. package/dist/cmd/project/frameworks-landing-pages.js +0 -242
  38. package/dist/cmd/project/frameworks-landing-pages.js.map +0 -1
  39. package/src/cmd/project/frameworks-ai-examples.ts +0 -166
  40. package/src/cmd/project/frameworks-landing-pages.ts +0 -267
@@ -0,0 +1,241 @@
1
+ import { useState, type ChangeEvent } from 'react';
2
+ import type { Route } from './+types/home';
3
+
4
+ export function meta({}: Route.MetaArgs) {
5
+ return [
6
+ { title: 'Agentuity + React Router' },
7
+ { name: 'description', content: 'AI translation demo with Agentuity' },
8
+ ];
9
+ }
10
+
11
+ const LANGUAGES = ['Spanish', 'French', 'German', 'Chinese'] as const;
12
+ const MODELS = ['gpt-4o-mini', 'gpt-4o', 'gpt-4.1-nano'] as const;
13
+ const DEFAULT_TEXT =
14
+ 'Welcome to Agentuity! This translation demo shows what you can build with the platform. It connects to AI models through our gateway — no separate API keys needed. Try translating this text into different languages to see it in action.';
15
+
16
+ export default function Home() {
17
+ const [text, setText] = useState(DEFAULT_TEXT);
18
+ const [toLanguage, setToLanguage] = useState<(typeof LANGUAGES)[number]>('Spanish');
19
+ const [model, setModel] = useState<(typeof MODELS)[number]>('gpt-4o-mini');
20
+ const [result, setResult] = useState<{
21
+ translation: string;
22
+ tokens: number;
23
+ model: string;
24
+ toLanguage: string;
25
+ } | null>(null);
26
+ const [isLoading, setIsLoading] = useState(false);
27
+ const [error, setError] = useState<string | null>(null);
28
+
29
+ const handleTranslate = async () => {
30
+ setIsLoading(true);
31
+ setError(null);
32
+ try {
33
+ const res = await fetch('/api/translate', {
34
+ method: 'POST',
35
+ headers: { 'Content-Type': 'application/json' },
36
+ body: JSON.stringify({ text, toLanguage, model }),
37
+ });
38
+ if (!res.ok) {
39
+ const errBody = await res.json().catch(() => ({ message: `API error ${res.status}` }));
40
+ throw new Error(errBody.message || `API error ${res.status}`);
41
+ }
42
+ setResult(await res.json());
43
+ } catch (err) {
44
+ setError(err instanceof Error ? err.message : 'Translation failed');
45
+ } finally {
46
+ setIsLoading(false);
47
+ }
48
+ };
49
+
50
+ return (
51
+ <div className="flex min-h-screen justify-center font-sans text-white">
52
+ <div className="flex w-full max-w-3xl flex-col gap-4 p-16">
53
+ {/* Header */}
54
+ <div className="relative mb-8 flex flex-col items-center justify-center gap-2 text-center">
55
+ <svg
56
+ aria-hidden="true"
57
+ className="mb-4 h-auto w-12"
58
+ fill="none"
59
+ height="191"
60
+ viewBox="0 0 220 191"
61
+ width="220"
62
+ xmlns="http://www.w3.org/2000/svg"
63
+ >
64
+ <path
65
+ clipRule="evenodd"
66
+ d="M220 191H0L31.427 136.5H0L8 122.5H180.5L220 191ZM47.5879 136.5L24.2339 177H195.766L172.412 136.5H47.5879Z"
67
+ fill="var(--color-cyan-500)"
68
+ fillRule="evenodd"
69
+ />
70
+ <path
71
+ clipRule="evenodd"
72
+ d="M110 0L157.448 82.5H189L197 96.5H54.5L110 0ZM78.7021 82.5L110 28.0811L141.298 82.5H78.7021Z"
73
+ fill="var(--color-cyan-500)"
74
+ fillRule="evenodd"
75
+ />
76
+ </svg>
77
+ <h1 className="text-5xl font-thin">Welcome to Agentuity</h1>
78
+ <p className="text-lg text-gray-400">
79
+ <span className="font-serif italic">React Router</span> + AI Gateway
80
+ </p>
81
+ </div>
82
+
83
+ {/* Translate Form */}
84
+ <div className="flex flex-col gap-6 rounded-lg border border-gray-900 bg-black p-8 text-gray-400 shadow-2xl">
85
+ <div className="flex flex-wrap items-center gap-1.5">
86
+ Translate to
87
+ <select
88
+ className="-mb-0.5 cursor-pointer appearance-none border-0 border-b border-dashed border-gray-700 bg-transparent font-normal text-white outline-none hover:border-b-cyan-400 focus:border-b-cyan-400"
89
+ disabled={isLoading}
90
+ onChange={(e: ChangeEvent<HTMLSelectElement>) =>
91
+ setToLanguage(e.currentTarget.value as (typeof LANGUAGES)[number])
92
+ }
93
+ value={toLanguage}
94
+ >
95
+ {LANGUAGES.map((lang) => (
96
+ <option key={lang} value={lang}>
97
+ {lang}
98
+ </option>
99
+ ))}
100
+ </select>
101
+ using
102
+ <select
103
+ className="-mb-0.5 cursor-pointer appearance-none border-0 border-b border-dashed border-gray-700 bg-transparent font-normal text-white outline-none hover:border-b-cyan-400 focus:border-b-cyan-400"
104
+ disabled={isLoading}
105
+ onChange={(e: ChangeEvent<HTMLSelectElement>) =>
106
+ setModel(e.currentTarget.value as (typeof MODELS)[number])
107
+ }
108
+ value={model}
109
+ >
110
+ {MODELS.map((m) => (
111
+ <option key={m} value={m}>
112
+ {m}
113
+ </option>
114
+ ))}
115
+ </select>
116
+ <div className="group relative z-0 ml-auto">
117
+ <div className="absolute inset-0 rounded-lg bg-linear-to-r from-cyan-700 via-blue-500 to-purple-600 opacity-75 blur-xl transition-all duration-700 group-hover:opacity-100 group-hover:blur-2xl" />
118
+ <div className="absolute inset-0 rounded-lg bg-cyan-500/50 opacity-50 blur-3xl" />
119
+ <button
120
+ className="relative cursor-pointer rounded-lg bg-gray-950 px-4 py-2 font-semibold text-white shadow-2xl disabled:cursor-not-allowed disabled:opacity-50"
121
+ disabled={isLoading || !text.trim()}
122
+ onClick={handleTranslate}
123
+ type="button"
124
+ data-loading={isLoading}
125
+ >
126
+ {isLoading ? 'Translating' : 'Translate'}
127
+ </button>
128
+ </div>
129
+ </div>
130
+
131
+ <textarea
132
+ className="z-10 min-h-28 resize-y rounded-md border border-gray-800 bg-gray-950 px-4 py-3 text-sm text-white focus:outline-2 focus:outline-offset-2 focus:outline-cyan-500"
133
+ disabled={isLoading}
134
+ onChange={(e: ChangeEvent<HTMLTextAreaElement>) => setText(e.currentTarget.value)}
135
+ placeholder="Enter text to translate..."
136
+ rows={4}
137
+ value={text}
138
+ />
139
+
140
+ {/* Translation Result */}
141
+ {error ? (
142
+ <div className="rounded-md border border-red-800 bg-red-950 px-4 py-3 text-sm text-red-400">
143
+ {error}
144
+ </div>
145
+ ) : isLoading ? (
146
+ <div
147
+ className="rounded-md border border-gray-800 bg-gray-950 px-4 py-3 text-sm text-gray-600"
148
+ data-loading="true"
149
+ />
150
+ ) : !result?.translation ? (
151
+ <div className="output rounded-md border border-gray-800 bg-gray-950 px-4 py-3 text-sm text-gray-600">
152
+ Translation will appear here
153
+ </div>
154
+ ) : (
155
+ <div className="flex flex-col gap-3">
156
+ <div className="output rounded-md border border-gray-800 bg-gray-950 px-4 py-3 text-sm text-cyan-500">
157
+ {result.translation}
158
+ </div>
159
+ <div className="flex gap-4 text-xs text-gray-500">
160
+ {result.tokens > 0 && (
161
+ <span>
162
+ Tokens <strong className="text-gray-400">{result.tokens}</strong>
163
+ </span>
164
+ )}
165
+ <span>
166
+ Model <strong className="text-gray-400">{result.model}</strong>
167
+ </span>
168
+ <span>
169
+ Language <strong className="text-gray-400">{result.toLanguage}</strong>
170
+ </span>
171
+ </div>
172
+ </div>
173
+ )}
174
+ </div>
175
+
176
+ {/* How it works */}
177
+ <div className="rounded-lg border border-gray-900 bg-black p-8">
178
+ <h3 className="m-0 mb-6 text-xl font-normal leading-none text-white">How it works</h3>
179
+ <div className="flex flex-col gap-6">
180
+ {[
181
+ {
182
+ title: 'AI Gateway routing',
183
+ text: (
184
+ <>
185
+ <code className="text-white">agentuity dev</code> automatically sets
186
+ OPENAI_API_KEY and OPENAI_BASE_URL so the AI SDK routes through the
187
+ Agentuity gateway.
188
+ </>
189
+ ),
190
+ },
191
+ {
192
+ title: 'Route actions',
193
+ text: (
194
+ <>
195
+ Edit <code className="text-white">app/routes/api.translate.ts</code> to
196
+ change the AI model, prompt, or add new routes.
197
+ </>
198
+ ),
199
+ },
200
+ {
201
+ title: 'React Router',
202
+ text: (
203
+ <>
204
+ Add routes in <code className="text-white">app/routes/</code> — nested
205
+ routing with built-in data loading.
206
+ </>
207
+ ),
208
+ },
209
+ ].map((step) => (
210
+ <div key={step.title} className="flex items-start gap-3">
211
+ <div className="flex size-4 shrink-0 items-center justify-center rounded border border-green-500 bg-green-950">
212
+ <svg
213
+ aria-hidden="true"
214
+ className="size-2.5"
215
+ fill="none"
216
+ height="24"
217
+ stroke="var(--color-green-500)"
218
+ strokeLinecap="round"
219
+ strokeLinejoin="round"
220
+ strokeWidth="2"
221
+ viewBox="0 0 24 24"
222
+ width="24"
223
+ xmlns="http://www.w3.org/2000/svg"
224
+ >
225
+ <path d="M20 6 9 17l-5-5" />
226
+ </svg>
227
+ </div>
228
+ <div>
229
+ <h4 className="-mt-0.5 mb-0.5 text-sm font-normal text-white">
230
+ {step.title}
231
+ </h4>
232
+ <p className="text-xs text-gray-400">{step.text}</p>
233
+ </div>
234
+ </div>
235
+ ))}
236
+ </div>
237
+ </div>
238
+ </div>
239
+ </div>
240
+ );
241
+ }
@@ -0,0 +1,24 @@
1
+ import { generateText } from 'ai';
2
+ import { openai } from '@ai-sdk/openai';
3
+ import type { Actions } from './$types';
4
+
5
+ export const actions: Actions = {
6
+ default: async ({ request }) => {
7
+ const formData = await request.formData();
8
+ const text = formData.get('text') as string;
9
+ const toLanguage = formData.get('toLanguage') as string;
10
+ const model = (formData.get('model') as string) || 'gpt-4o-mini';
11
+
12
+ const { text: translation, usage } = await generateText({
13
+ model: openai(model),
14
+ prompt: `Translate the following text to ${toLanguage}. Return only the translation, nothing else.\n\n${text}`,
15
+ });
16
+
17
+ return {
18
+ translation,
19
+ tokens: usage?.totalTokens ?? 0,
20
+ model,
21
+ toLanguage,
22
+ };
23
+ },
24
+ };
@@ -0,0 +1,204 @@
1
+ <script lang="ts">
2
+ import { enhance } from '$app/forms';
3
+
4
+ const LANGUAGES = ['Spanish', 'French', 'German', 'Chinese'] as const;
5
+ const MODELS = ['gpt-4o-mini', 'gpt-4o', 'gpt-4.1-nano'] as const;
6
+ const DEFAULT_TEXT =
7
+ 'Welcome to Agentuity! This translation demo shows what you can build with the platform. It connects to AI models through our gateway — no separate API keys needed. Try translating this text into different languages to see it in action.';
8
+
9
+ let text = $state(DEFAULT_TEXT);
10
+ let toLanguage: (typeof LANGUAGES)[number] = $state('Spanish');
11
+ let model: (typeof MODELS)[number] = $state('gpt-4o-mini');
12
+ let isLoading = $state(false);
13
+
14
+ let { form } = $props();
15
+ </script>
16
+
17
+ <svelte:head>
18
+ <title>Agentuity + SvelteKit</title>
19
+ </svelte:head>
20
+
21
+ <div class="flex min-h-screen justify-center font-sans text-white">
22
+ <div class="flex w-full max-w-3xl flex-col gap-4 p-16">
23
+ <!-- Header -->
24
+ <div class="relative mb-8 flex flex-col items-center justify-center gap-2 text-center">
25
+ <svg
26
+ aria-hidden="true"
27
+ class="mb-4 h-auto w-12"
28
+ fill="none"
29
+ height="191"
30
+ viewBox="0 0 220 191"
31
+ width="220"
32
+ xmlns="http://www.w3.org/2000/svg"
33
+ >
34
+ <path
35
+ clip-rule="evenodd"
36
+ d="M220 191H0L31.427 136.5H0L8 122.5H180.5L220 191ZM47.5879 136.5L24.2339 177H195.766L172.412 136.5H47.5879Z"
37
+ fill="var(--color-cyan-500)"
38
+ fill-rule="evenodd"
39
+ />
40
+ <path
41
+ clip-rule="evenodd"
42
+ d="M110 0L157.448 82.5H189L197 96.5H54.5L110 0ZM78.7021 82.5L110 28.0811L141.298 82.5H78.7021Z"
43
+ fill="var(--color-cyan-500)"
44
+ fill-rule="evenodd"
45
+ />
46
+ </svg>
47
+ <h1 class="text-5xl font-thin">Welcome to Agentuity</h1>
48
+ <p class="text-lg text-gray-400">
49
+ <span class="font-serif italic">SvelteKit</span> + AI Gateway
50
+ </p>
51
+ </div>
52
+
53
+ <!-- Translate Form -->
54
+ <form
55
+ class="flex flex-col gap-6 rounded-lg border border-gray-900 bg-black p-8 text-gray-400 shadow-2xl"
56
+ method="POST"
57
+ use:enhance={() => {
58
+ isLoading = true;
59
+ return async ({ update }) => {
60
+ await update();
61
+ isLoading = false;
62
+ };
63
+ }}
64
+ >
65
+ <div class="flex flex-wrap items-center gap-1.5">
66
+ Translate to
67
+ <select
68
+ class="-mb-0.5 cursor-pointer appearance-none border-0 border-b border-dashed border-gray-700 bg-transparent font-normal text-white outline-none hover:border-b-cyan-400 focus:border-b-cyan-400"
69
+ {...isLoading ? { disabled: true } : {}}
70
+ name="toLanguage"
71
+ bind:value={toLanguage}
72
+ >
73
+ {#each LANGUAGES as lang}
74
+ <option value={lang}>{lang}</option>
75
+ {/each}
76
+ </select>
77
+ using
78
+ <select
79
+ class="-mb-0.5 cursor-pointer appearance-none border-0 border-b border-dashed border-gray-700 bg-transparent font-normal text-white outline-none hover:border-b-cyan-400 focus:border-b-cyan-400"
80
+ {...isLoading ? { disabled: true } : {}}
81
+ name="model"
82
+ bind:value={model}
83
+ >
84
+ {#each MODELS as m}
85
+ <option value={m}>{m}</option>
86
+ {/each}
87
+ </select>
88
+ <div class="group relative z-0 ml-auto">
89
+ <div
90
+ class="absolute inset-0 rounded-lg bg-linear-to-r from-cyan-700 via-blue-500 to-purple-600 opacity-75 blur-xl transition-all duration-700 group-hover:opacity-100 group-hover:blur-2xl"
91
+ />
92
+ <div class="absolute inset-0 rounded-lg bg-cyan-500/50 opacity-50 blur-3xl" />
93
+ <button
94
+ class="relative cursor-pointer rounded-lg bg-gray-950 px-4 py-2 font-semibold text-white shadow-2xl disabled:cursor-not-allowed disabled:opacity-50"
95
+ disabled={isLoading || !text.trim()}
96
+ type="submit"
97
+ data-loading={isLoading}
98
+ >
99
+ {isLoading ? 'Translating' : 'Translate'}
100
+ </button>
101
+ </div>
102
+ </div>
103
+
104
+ <input type="hidden" name="text" bind:value={text} />
105
+ <textarea
106
+ class="z-10 min-h-28 resize-y rounded-md border border-gray-800 bg-gray-950 px-4 py-3 text-sm text-white focus:outline-2 focus:outline-offset-2 focus:outline-cyan-500"
107
+ disabled={isLoading}
108
+ bind:value={text}
109
+ placeholder="Enter text to translate..."
110
+ rows="4"
111
+ name="textDisplay"
112
+ oninput={() => { text = (event?.target as HTMLTextAreaElement)?.value ?? text; }}
113
+ />
114
+
115
+ <!-- Translation Result -->
116
+ {#if form?.error}
117
+ <div
118
+ class="rounded-md border border-red-800 bg-red-950 px-4 py-3 text-sm text-red-400"
119
+ >
120
+ {form.error.message ?? 'Translation failed'}
121
+ </div>
122
+ {:else if isLoading}
123
+ <div
124
+ class="rounded-md border border-gray-800 bg-gray-950 px-4 py-3 text-sm text-gray-600"
125
+ data-loading="true"
126
+ />
127
+ {:else if !form?.translation}
128
+ <div
129
+ class="output rounded-md border border-gray-800 bg-gray-950 px-4 py-3 text-sm text-gray-600"
130
+ >
131
+ Translation will appear here
132
+ </div>
133
+ {:else}
134
+ <div class="flex flex-col gap-3">
135
+ <div
136
+ class="output rounded-md border border-gray-800 bg-gray-950 px-4 py-3 text-sm text-cyan-500"
137
+ >
138
+ {form.translation}
139
+ </div>
140
+ <div class="flex gap-4 text-xs text-gray-500">
141
+ {#if form.tokens > 0}
142
+ <span>
143
+ Tokens <strong class="text-gray-400">{form.tokens}</strong>
144
+ </span>
145
+ {/if}
146
+ <span>
147
+ Model <strong class="text-gray-400">{form.model}</strong>
148
+ </span>
149
+ <span>
150
+ Language <strong class="text-gray-400">{form.toLanguage}</strong>
151
+ </span>
152
+ </div>
153
+ </div>
154
+ {/if}
155
+ </form>
156
+
157
+ <!-- How it works -->
158
+ <div class="rounded-lg border border-gray-900 bg-black p-8">
159
+ <h3 class="m-0 mb-6 text-xl font-normal leading-none text-white">How it works</h3>
160
+ <div class="flex flex-col gap-6">
161
+ {#each [
162
+ {
163
+ title: 'AI Gateway routing',
164
+ text: '`agentuity dev` automatically sets OPENAI_API_KEY and OPENAI_BASE_URL so the AI SDK routes through the Agentuity gateway.',
165
+ },
166
+ {
167
+ title: 'Form actions',
168
+ text: 'Edit `src/routes/+page.server.ts` to change the AI model, prompt, or add new actions.',
169
+ },
170
+ {
171
+ title: 'SvelteKit',
172
+ text: 'Add routes in `src/routes/` — file-based routing with SSR and form actions.',
173
+ },
174
+ ] as step}
175
+ <div class="flex items-start gap-3">
176
+ <div
177
+ class="flex size-4 shrink-0 items-center justify-center rounded border border-green-500 bg-green-950"
178
+ >
179
+ <svg
180
+ aria-hidden="true"
181
+ class="size-2.5"
182
+ fill="none"
183
+ height="24"
184
+ stroke="var(--color-green-500)"
185
+ stroke-linecap="round"
186
+ stroke-linejoin="round"
187
+ stroke-width="2"
188
+ viewBox="0 0 24 24"
189
+ width="24"
190
+ xmlns="http://www.w3.org/2000/svg"
191
+ >
192
+ <path d="M20 6 9 17l-5-5" />
193
+ </svg>
194
+ </div>
195
+ <div>
196
+ <h4 class="-mt-0.5 mb-0.5 text-sm font-normal text-white">{step.title}</h4>
197
+ <p class="text-xs text-gray-400">{step.text}</p>
198
+ </div>
199
+ </div>
200
+ {/each}
201
+ </div>
202
+ </div>
203
+ </div>
204
+ </div>
@@ -0,0 +1,39 @@
1
+ import { generateText } from 'ai';
2
+ import { openai } from '@ai-sdk/openai';
3
+
4
+ Bun.serve({
5
+ port: process.env.PORT ?? 3000,
6
+ async fetch(request) {
7
+ const url = new URL(request.url);
8
+
9
+ if (url.pathname === '/api/translate' && request.method === 'POST') {
10
+ const { text, toLanguage, model = 'gpt-4o-mini' } = await request.json();
11
+
12
+ const { text: translation, usage } = await generateText({
13
+ model: openai(model),
14
+ prompt: `Translate the following text to ${toLanguage}. Return only the translation, nothing else.\n\n${text}`,
15
+ });
16
+
17
+ return Response.json({
18
+ translation,
19
+ tokens: usage?.totalTokens ?? 0,
20
+ model,
21
+ toLanguage,
22
+ });
23
+ }
24
+
25
+ // Proxy all other requests to Vite dev server
26
+ const viteUrl = 'http://localhost:5173' + url.pathname + url.search;
27
+ const viteRes = await fetch(viteUrl, {
28
+ method: request.method,
29
+ headers: request.headers,
30
+ body: request.method !== 'GET' && request.method !== 'HEAD' ? request.body : undefined,
31
+ });
32
+ return new Response(viteRes.body, {
33
+ status: viteRes.status,
34
+ headers: viteRes.headers,
35
+ });
36
+ },
37
+ });
38
+
39
+ console.log('Server running on http://localhost:' + (process.env.PORT ?? 3000));