Core API
createApp()
Section titled “createApp()”Creates a new application instance.
Syntax
Section titled “Syntax”function createApp(options: AppOptions): AppParameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
options | AppOptions | Yes | Configuration options |
AppOptions
Section titled “AppOptions”interface AppOptions { name: string; version?: string; debug?: boolean; timeout?: number;}Returns
Section titled “Returns”Returns an App instance.
Example
Section titled “Example”import { createApp } from 'your-package-name';
const app = createApp({ name: 'My App', debug: true, timeout: 10000});App Class
Section titled “App Class”The main application class.
Methods
Section titled “Methods”Starts the application.
app.run(): Promise<void>stop()
Section titled “stop()”Stops the application.
app.stop(): Promise<void>Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
name | string | Application name |
isRunning | boolean | Whether the app is running |