UNPKG

frontend-hamroun

Version:

A lightweight frontend JavaScript framework with React-like syntax

43 lines 989 B
/** * Public type definitions for server functionality * These types are safe to import in any environment */ export interface ServerConfig { port?: number; apiDir?: string; pagesDir?: string; staticDir?: string; enableCors?: boolean; corsOptions?: any; db?: { url: string; type: 'mongodb' | 'mysql' | 'postgres'; }; auth?: { secret: string; expiresIn?: string; }; } export interface Server { start(): Promise<void>; stop(): Promise<void>; getExpressApp(): any; getDatabase(): any; getAuth(): any; } export interface User { id: string | number; username: string; password?: string; email?: string; roles?: string[]; [key: string]: any; } export interface DbConfig { url: string; type: 'mongodb' | 'mysql' | 'postgres'; } export interface MiddlewareFunction { (req: any, res: any, next: any): void | Promise<void>; } //# sourceMappingURL=server-types.d.ts.map