burger-api
Version:
<p align="center"> <img src="https://github.com/user-attachments/assets/0d9b376e-1d89-479a-aa7f-e7ee3c6b2342" alt="BurgerAPI logo"/> </p>
21 lines (20 loc) • 746 B
TypeScript
import type { ServerOptions, FetchHandler } from '@burgerTypes';
export declare class Server {
private options;
private server;
/**
* Initializes a new instance of the Server class with the given options.
* @param options - Configuration options for the server.
*/
constructor(options: ServerOptions);
start(routes: {
[key: string]: any;
} | undefined, handler: FetchHandler, port: number, cb?: () => void): void;
/**
* Stops the server.
* If the server is currently running, this method will stop the server and
* log a message to the console indicating that the server has been stopped.
* If the server is not running, this method does nothing.
*/
stop(): void;
}