This is a proof of concept for connecting postgres.js to PGlite using pg-gateway.
See more discussion on this issue for the general idea and this issue for a bug in PGlite that requires workarounds present in this repo.
While this was set up to run in a node environment, this should be possible in deno or a browser, with minimal modification.
npm install
npm start
The following will watch for file changes and restart, running with --inspect
to allow debuggint via VSCode/etc.
This runs TS directly in node, and requires a sufficiently recent version with support for --experimental-strip-types
.
npm install
# Or run the "dev" NPM script from your IDE's debug tool.
npm run dev