Support for a DATABASE_URL style config
mattrobenolt opened this issue · 1 comments
I think either providing a helper such as configFromEnv('DATABASE_URL')
or something along these lines to parse a config in a traditional mysql://user:pass@host
would be nice for configuration, we can even be a bit more planetscale specific with our URI such as pscale://user:pass@aws.connect.psdb.cloud
. I don't personally have an opinion if this is it's own thing like:
connect(configFromEnv())
Or built into the config such as:
connect({uri: env['DATABASE_URL']})
Up to whatever you think is most common or would be most desirable to adopt.
This would allow simplifying an application config with one variable instead of 3 different ones, and we can leverage the already standard DATABASE_URL
that's established.
Potentially related: planetscale/f1-championship-stats#18