staticbackendhq / core

Backend server API handling user mgmt, database, storage and real-time component
https://staticbackend.com
MIT License
700 stars 66 forks source link

Support URL-like database DSN #29

Closed dstpierre closed 2 years ago

dstpierre commented 2 years ago

At this moment the database connection string is specified via the environment variable DATABASE_URL.

It would be nice to be able to specify URL-like database DSN using format like: postgresql://user:pass@localhost/dbname/?sslmode=disable.

Ideally the goal would be to keep only one env variable DATABASE_URL and detect if it's using an URL-like or the database provider's connection string format.

Library: https://github.com/xo/dburl