UNPKG

@wishcore/wish-sdk

Version:

Wish API for node. Used for building Wish Apps.

42 lines (41 loc) 1.17 kB
export interface WishCoreRunnerOpts { /** Listen for wish connections from other nodes */ nodePort?: number; /** Port for listening for applications */ appPort?: number; /** * Working directory for wish-core * * Saves and reads wish.conf and wish identity db file. * * Defaults to `./env` */ cwd?: string; disableLocalDiscovery?: boolean; } /** * Run a pre-built wish-core * * This is provided for convenience. Can be configured to run with specific ports, * which enables multi-node setups on a single computer for testing and development. */ export declare class WishCoreRunner { private platform; private arch; private nodePort; private appPort; private cwd; private disableLocalDiscovery; private binary; private child; /** Stop `wish-core` */ kill(): void; private constructor(); /** * Start up `wish-core` and returns `WishCoreRunner` instance * * Waits for the child process to start before returning. Restarts core if killed or crashes. */ static start(opts?: WishCoreRunnerOpts): Promise<WishCoreRunner>; private spawn; }