Skip to main content

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 compile with cross-compilation support
  • Node.js: Uses Single Executable Application (SEA) process

Parameters

ParameterTypeDescription
optionsCompileOptionsConfiguration 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"
});