Skip to content

egon-orm-workspace / @egon-orm/cli / run

Function: run() ​

ts
function run(argv, io?): Promise<number>;

Defined in: cli/src/cli.ts:108

Runs egon with argv (the arguments after the program name) and returns the exit code: 0 on success, 1 on a failure, 2 on a usage error.

Parameters ​

argv ​

readonly string[]

io? ​

CliIo = ...

Returns ​

Promise<number>

Example ​

ts
import { run } from "@egon-orm/cli";

process.exitCode = await run(["migrate", "--step", "1"]);