Function: compile()
compile(
options):Promise<void>
Defined in: cli/compile.ts:168
Compiles a GoatDB application into a standalone executable.
This is a unified interface that auto-detects the runtime and uses the appropriate compiler:
- Deno: Uses
deno compilewith cross-compilation support - Node.js: Uses Single Executable Application (SEA) process
Parameters
| Parameter | Type | Description |
|---|---|---|
options | CompileOptions | Configuration options for the compilation process |
Returns
Promise<void>
A Promise that resolves when compilation is complete
Example
await compile({
serverEntry: "./server/main.ts",
outputName: "my-app",
os: "linux",
arch: "x64",
htmlPath: "./public/index.html",
jsPath: "./client/index.tsx",
buildDir: "./build"
});