IFClite TypeScript API
    Preparing search index...

    Function runBinary

    @ifc-lite/server-bin

    Pre-built IFC-Lite server binary - run without Docker or Rust.

    CLI Usage: npx @ifc-lite/server-bin npx ifc-lite-server

    Programmatic Usage:

    import { runBinary, ensureBinary, getBinaryInfo } from '@ifc-lite/server-bin';

    // Get binary info
    const info = getBinaryInfo();
    console.log(`Platform: ${info.platform.targetTriple}`);
    console.log(`Cached: ${info.isCached}`);

    // Ensure binary is downloaded
    const binaryPath = await ensureBinary();

    // Run the server. It is configured through its environment only.
    const exitCode = await runBinary([], { env: { ...process.env, PORT: '3001' } });
    • Run the server binary; resolves with its exit code.

      The server reads its configuration from the environment only, so pass settings through options.env. args go to the binary verbatim, and the binary parses no configuration flags (--panic-strategy-selftest is the one flag it reads).

      Parameters

      Returns Promise<number>