UNPKG

pg-browser-proxy

Version:

A WebSocket-TCP proxy that enables PostgreSQL clients to connect to a Postgres database running in the browser

17 lines (13 loc) 406 B
import * as net from 'net'; import * as http from 'http'; interface ProxyConfig { tcpPort?: number; wsPort?: number; } declare function createProxy(config?: ProxyConfig): { httpServer: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>; tcpServer: net.Server; start: () => Promise<void>; shutdown: (signal?: string) => Promise<void>; }; export { createProxy };