webpresence
Version:
Discord Rich Presence for websites - Show your browsing activity in Discord
47 lines (45 loc) • 1.2 kB
TypeScript
/**
* Daemon utilities for WebPresence server
*
* Provides functionality for running the server as a background daemon process
*/
/**
* Start the server as a daemon process
* @param options Options for starting the daemon
* @returns Promise that resolves when the daemon is started
*/
declare function startDaemon(options?: {
port?: number;
}): Promise<{
success: boolean;
message: string;
pid?: undefined;
} | {
success: boolean;
message: string;
pid: number | undefined;
}>;
/**
* Stop the daemon process
* @returns Promise that resolves when the daemon is stopped
*/
declare function stopDaemon(): Promise<{
success: boolean;
message: string;
}>;
/**
* Check if the daemon is running
* @returns True if the daemon is running, false otherwise
*/
declare function isDaemonRunning(): boolean;
/**
* Get the daemon PID if running
* @returns The daemon PID or null if not running
*/
declare function getDaemonPid(): number | null;
/**
* Get the path to the daemon log file
* @returns The path to the daemon log file
*/
declare function getDaemonLogPath(): string;
export { getDaemonLogPath, getDaemonPid, isDaemonRunning, startDaemon, stopDaemon };