@lazarv/react-server/dev
Programmatic entry point to the development server. Equivalent to invoking the react-server CLI without arguments.
function reactServer(root: string, options?: {
outDir?: string;
host?: string;
port?: number;
https?: boolean;
open?: boolean | string;
cors?: boolean;
force?: boolean;
clearScreen?: boolean;
noColor?: boolean;
eval?: string;
}, initialConfig?: Record<string, any>): Promise<{
listen: () => http.Server;
close: () => Promise<void>;
ws: WebSocketServer;
middlewares: Connect.Server;
}>;
Use the @lazarv/react-server Vite development server as a middleware in a Node.js server.
Parameters
root— Entry point of the React applicationoptions— Options for the server, same as the options for the react-server CLI command