UNPKG

@mojojs/core

Version:

Real-time web framework

21 lines (20 loc) 678 B
import type { MojoApp, ServerResponseBody } from './types.js'; import { type Readable } from 'node:stream'; import { ServerRequest } from './server/request.js'; import { ServerResponse } from './server/response.js'; /** * CGI class. Is this a joke? Yes. Could you use it in production anyway? Probably. */ export declare class CGI { app: MojoApp; constructor(app: MojoApp); /** * Create a request object for a CGI environment. */ static envToRequest(env: NodeJS.ProcessEnv, body: Readable): ServerRequest; /** * Run CGI application. */ run(): Promise<void>; _sendResponse(res: ServerResponse, body: ServerResponseBody): void; }