PaimaStudios / paima-game-templates

Paima Engine Game Templates for developers.
https://paimastudios.com
MIT License
11 stars 8 forks source link

add a pglite db server #71

Open GGAlanSmithee opened 5 months ago

GGAlanSmithee commented 5 months ago

This is an example on how we could run a pg server in memory. This would make the dev flow more frictionless, as it removes the dependency on Docker. As you can see, this implements this in the ntf-lvlup example, and that is just to be able to test this. If we were to move forward with this, I think there is a bit more to do in regards to migrations, and ofc. implement it in the other examples.

The great upside with this approach is that it does not require any change in paima-engine, or in the game code at all, and simply treats pg-lite as a different pg server, which is a great win IMO.

As it is now, this does not work, because pg-lite is single connection only. This is something they are working on though, and should be done within a couple of months, so I am opening this draft PR, to pick it up when they are done with that.