Ability to easily switch branches for local development
mscoutermarsh opened this issue ยท 2 comments
Currently, database.js is not compatible with pscale connect
because they are entirely different protocols (http vs mysql).
One pain point when using database.js for local development is quickly switching branches. Ideally, we'd find a solution where developers do not have to create & copy/paste connection strings into their code to swap branches.
Opening this issue so that: 1. People find it when googling. 2. to track the discussion in one place.
Other context:
I would love to see the ability with pscale connect
to proxy the http endpoint as well. Ideally it would be great to be able to choose between proxying mysql
or http
or both through options. Couple that with the ability to override the port
during config of @planetscale/database
would be perfect. Means the DATABASE_URL
env var can still be your standard proxied connection string that can be used for direct db connections, but we can override the port for @planetscale/database
which would let us connect through the additional proxy.
For those wanting to give some early feedback, I've published some very early release of something I've been working on here:
https://github.com/mattrobenolt/ps-http-sim
Very much would like to get feedback at this point and iron out bugs.