The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Adds diagrams
Copple748b14fb3f19
diff --git a/apps/www/_blog/2022-10-03-postgres-wasm.mdx b/apps/www/_blog/2022-10-03-postgres-wasm.mdxindex 700be12e20f..824f769f4e8 100644--- a/apps/www/_blog/2022-10-03-postgres-wasm.mdx+++ b/apps/www/_blog/2022-10-03-postgres-wasm.mdx@@ -177,12 +177,12 @@ The VM includes an emulated network card (`ne2k-pci`) and a `proxy_url` startuprunning a websocket proxy (i.e. on the internet). The websocket proxy establishes connections via a websocket port, then accepts raw ethernet packets.It turns those raw packets into TCP/IP packets and routes them between the Internet and the VM.-+With our tunnel established, we could now send network traffic to the outside world. For example, try “starting” the network on the VM,"exiting" out of psql (`cmd`+`D`), and then run `ping 1.1.1.1`.-+Most v86 VM's use an open proxy at `wss://relay.widgetry.org/` based on [websockproxy](https://github.com/benjamincburns/websockproxy).This proxy allows the VM to communicate with the outside world. It can handle all the basic use-cases like loading@@ -193,14 +193,14 @@ For instance, you can't connect a local `PgAdmin4` to the PostgreSQL instance ruSo we [forked](https://github.com/snaplet/postgres-wasm/tree/main/packages/websockproxy) the [proxy](https://github.com/benjamincburns/websockproxy) andadded nginx to provide a reverse proxy.-+The reverse proxy listens on a range of ports, mapping each port to the VM at a specific private address you want to reach.The simple solution was to take the last 2 segments of the private IP and map it to a port number. So if your private IP is 10.5.6.123,you connect to the proxy on port 6123 and that points you to PostgreSQL (running on port 5432) on private IP 10.5.6.123. Shortened addresses are padded,so 10.5.6.2 maps to port 6002 and 10.5.6.44 to port 6044.-+### Sending commands to the emulator from the browser UIdiff --git a/apps/www/public/images/blog/postgres-wasm/pg-wasm-diagram1.jpg b/apps/www/public/images/blog/postgres-wasm/pg-wasm-diagram1.jpgnew file mode 100644index 00000000000..7945b9e19c2Binary files /dev/null and b/apps/www/public/images/blog/postgres-wasm/pg-wasm-diagram1.jpg differdiff --git a/apps/www/public/images/blog/postgres-wasm/pg-wasm-diagram2.jpg b/apps/www/public/images/blog/postgres-wasm/pg-wasm-diagram2.jpgnew file mode 100644index 00000000000..7ae23c405c3Binary files /dev/null and b/apps/www/public/images/blog/postgres-wasm/pg-wasm-diagram2.jpg differdiff --git a/apps/www/public/images/blog/postgres-wasm/pg-wasm-diagram3.jpg b/apps/www/public/images/blog/postgres-wasm/pg-wasm-diagram3.jpgnew file mode 100644index 00000000000..342b2b4f365Binary files /dev/null and b/apps/www/public/images/blog/postgres-wasm/pg-wasm-diagram3.jpg differdiff --git a/apps/www/public/images/blog/postgres-wasm/pg-wasm-diagram4.jpg b/apps/www/public/images/blog/postgres-wasm/pg-wasm-diagram4.jpgnew file mode 100644index 00000000000..59a2b4a5896Binary files /dev/null and b/apps/www/public/images/blog/postgres-wasm/pg-wasm-diagram4.jpg differ