hikma-engine
Version:
Code Knowledge Graph Indexer - A sophisticated TypeScript-based indexer that transforms Git repositories into multi-dimensional knowledge stores for AI agents
65 lines • 1.61 kB
TypeScript
/**
* @file Express.js API server for hikma-engine semantic search.
* Provides RESTful endpoints for semantic, structural, git, and hybrid searches.
*/
import { Application } from 'express';
export interface ServerConfig {
port: number;
host: string;
cors: {
origin: string | string[] | boolean;
credentials: boolean;
};
rateLimit: {
windowMs: number;
max: number;
};
timeout: number;
}
/**
* API Server class that manages the Express.js application lifecycle.
*/
export declare class APIServer {
private app;
private server;
private logger;
private config;
constructor(config: ServerConfig);
/**
* Sets up middleware stack for the Express application.
*/
private setupMiddleware;
/**
* Sets up API routes.
*/
private setupRoutes;
/**
* Sets up global error handling middleware.
*/
private setupErrorHandling;
/**
* Starts the server and begins listening for requests.
*/
start(): Promise<void>;
/**
* Stops the server gracefully.
*/
stop(): Promise<void>;
/**
* Sets up graceful shutdown handling for process signals.
*/
private setupGracefulShutdown;
/**
* Gets the Express application instance.
*/
getApp(): Application;
/**
* Gets the HTTP server instance.
*/
getServer(): any;
}
/**
* Creates and configures the API server with default settings.
*/
export declare function createAPIServer(overrides?: Partial<ServerConfig>): APIServer;
//# sourceMappingURL=server.d.ts.map