postgres-wasm icon indicating copy to clipboard operation
postgres-wasm copied to clipboard

Make it possible to install Postgres via NPM for local dev and testing

Open stubailo opened this issue 3 years ago • 4 comments

We use Postgres in production, and I’d love to avoid having to install it globally on my machine for local dev.

would be awesome if you could just npm install something and have a real Postgres running virtually. Paul suggested I file an issue in case this is interesting to y’all! https://twitter.com/kiwicopple/status/1579196691584274433

stubailo avatar Oct 09 '22 20:10 stubailo

According to @jgoux, this is already possible using https://www.npmjs.com/package/embedded-postgres, which wraps https://github.com/zonkyio/embedded-postgres-binaries.

burggraf avatar Oct 10 '22 12:10 burggraf

Yes definitely, feel free to close if you're not interested in pursuing this! Feels like it would be nicer to have something that's more guaranteed to be portable, rather than needing separate binaries for each OS/arch.

stubailo avatar Oct 11 '22 06:10 stubailo

Yes definitely, feel free to close if you're not interested in pursuing this! Feels like it would be nicer to have something that's more guaranteed to be portable, rather than needing separate binaries for each OS/arch.

That's the dream for sure! Currently we're limited by WASM capabilities. It's tracked here: https://github.com/snaplet/postgres-wasm/issues/37

jgoux avatar Oct 11 '22 07:10 jgoux

Wouldn't it work to take the same approach of having a VM running in WASM, like you do for the browser? Or maybe I'm misunderstanding how it works

stubailo avatar Oct 12 '22 03:10 stubailo