@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 40 lines 1.34 KB
Raw
1 import * as Namespace from "alchemy/Namespace";
2 import { makeFrameworkSite, type FrameworkSiteProps } from "./FrameworkSite.ts";
3
4 /** Configuration for a Neon Octane website. */
5 export type OctaneProps = FrameworkSiteProps & {};
6
7 /**
8 * Octane SSR and client assets on Neon Functions. Select node() from @alchemy.run/frontend-frameworks/octane/node-adapter in the project’s octane.config.ts.
9 *
10 * Native framework development and HMR run without Neon cloud resources.
11 * Apply `Alchemy.remote()` to use the live Function deployment during dev.
12 * Packaging requires the optional `@vercel/nft` peer dependency.
13 *
14 * ### Creating a Website
15 * **Example:** Octane application
16 * ```typescript
17 * const site = yield* Neon.Website.Octane("Web", {
18 * rootDir: "./app",
19 * });
20 * ```
21 *
22 * ### Deployment Configuration
23 * **Example:** Existing project and custom hostname
24 * ```typescript
25 * const site = yield* Neon.Website.Octane("Web", {
26 * project,
27 * domain: "www.example.com",
28 * env: { API_BASE: "https://api.example.com" },
29 * function: { name: "Website" },
30 * });
31 * ```
32 *
33 * @resource
34 * @product Website
35 */
36 export const Octane = (id: string, props: OctaneProps = {}) =>
37 makeFrameworkSite(id, props, {
38 framework: "@alchemy.run/frontend-frameworks/octane",
39 target: "@alchemy.run/frontend-frameworks/octane/neon",
40 }).pipe(Namespace.push(id));