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

main
mdx 96 lines 3.07 KB
Raw
1 ---
2 title: Octane
3 description: Package Octane rendering and server routes as a Neon Function Fetch artifact.
4 sidebar:
5 order: 10
6 ---
7
8 `Neon.Website.Octane` packages Octane's handler and client assets for Node 24 Fetch
9 on Neon Functions. The deployed wrapper does not start a listening Bun server;
10 there is no container or S3 hosting layer.
11
12 ## Prepare the app
13
14 Use an existing Octane app or the
15 [runnable Octane example](https://github.com/alchemy-run/alchemy/tree/main/examples/neon-website-octane).
16 Configure [deployment credentials](/neon/setup), then install in the app directory:
17
18 Install [Alchemy and its matching Effect dependencies](/getting-started) first;
19 use Node 24 for this build toolchain.
20
21 ```sh
22 pnpm add -D @alchemy.run/frontend-frameworks @vercel/nft
23 ```
24
25 ## Select the build adapter
26
27 Octane requires the integration's Node adapter in `octane.config.ts`. Import it
28 alongside your existing configuration imports:
29
30 ```diff lang="typescript"
31 +import { node } from "@alchemy.run/frontend-frameworks/octane/node-adapter";
32 ```
33
34 This adapter emits the portable handler used by the Neon target.
35
36 ## Configure the adapter
37
38 ```diff lang="typescript"
39 export default defineConfig({
40 + adapter: node(),
41 ```
42
43 Set this instead of a different platform adapter; leave your router configuration
44 in place. `RenderRoute` and `ServerRoute` declarations stay in `octane.config.ts`.
45
46 ## Define the stack
47
48 ```typescript
49 // alchemy.run.ts
50 import * as Alchemy from "alchemy";
51 import * as Neon from "@alchemy.run/neon";
52 import * as Effect from "effect/Effect";
53
54 export default Alchemy.Stack(
55 "NeonOctane",
56 { providers: Neon.providers(), state: Alchemy.localState() },
57 Effect.gen(function* () {
58 const site = yield* Neon.Website.Octane("Web", {
59 rootDir: ".",
60 });
61 return { url: site.url };
62 }),
63 );
64 ```
65
66 The Function serves built client files and forwards application requests to the
67 Octane handler. Server routes can read `process.env`; public Vite variables are
68 embedded into browser assets, so do not put privileged credentials in them.
69
70 ## Develop and deploy
71
72 ```sh
73 pnpm exec alchemy dev
74 pnpm exec alchemy deploy
75 pnpm exec alchemy destroy
76 ```
77
78 Run separately, destroying when finished. Dev uses Octane's native Vite server
79 and HMR, returns a local URL, and creates no implicit Project or Function. Append
80 `.pipe(Alchemy.remote())` to the Website Effect to use live deployment during dev.
81
82 Omitting scope creates an Ohio Project on deploy. Supply either `project` or
83 `branch` to reuse a backend; choose Ohio when adding storage. See
84 [scope and credentials](/neon/frontend/vite#scope-and-credentials).
85
86 :::caution[Deployment limits]
87 Complete live framework acceptance remains unverified. Neon probes have served
88 old code/env after successful deployment metadata updates. There is no added CDN
89 or durable application cache, and domain registration does not validate TLS.
90 See the [shared deployment limits](/neon/frontend/vite#environment-and-deployment-limits).
91 :::
92
93 ## Reference
94
95 - [Octane API](/providers/neon/website/octane)
96 - [Runnable Octane example](https://github.com/alchemy-run/alchemy/tree/main/examples/neon-website-octane)