Skip to content

Core API

Creates a new application instance.

function createApp(options: AppOptions): App
ParameterTypeRequiredDescription
optionsAppOptionsYesConfiguration options
interface AppOptions {
name: string;
version?: string;
debug?: boolean;
timeout?: number;
}

Returns an App instance.

import { createApp } from 'your-package-name';
const app = createApp({
name: 'My App',
debug: true,
timeout: 10000
});

The main application class.

Starts the application.

app.run(): Promise<void>

Stops the application.

app.stop(): Promise<void>
PropertyTypeDescription
namestringApplication name
isRunningbooleanWhether the app is running