Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

DATABASE_URL env variable as source of database connection info #101

Open
itamarst opened this issue May 5, 2022 · 4 comments
Open

DATABASE_URL env variable as source of database connection info #101

itamarst opened this issue May 5, 2022 · 4 comments

Comments

@itamarst
Copy link

itamarst commented May 5, 2022

Is your feature request related to a problem? Please describe.
The DATABASE_URL environment variable is standard in many environments for specifying how to connect to the database. It would be nice if sqls could use, reducing the need for manual configuration.

Describe the solution you'd like
Check for the environment variable, if it's there use it to connect to the database.

Describe alternatives you've considered
Manual configuration.

Additional context
I don't know how standardized the format is. Possibly you'd need to do more work to support multiple variations.

@cizordj
Copy link

cizordj commented Sep 19, 2022

How would you setup multiple connection through environment vars?

@itamarst
Copy link
Author

How would you setup multiple connection through environment vars?

direnv: https://direnv.net/

@mattn
Copy link
Member

mattn commented Dec 30, 2023

I guess cizordj is talking about how to specify multiple connection string in one environment variable.

@cizordj
Copy link

cizordj commented Jan 5, 2024

I guess cizordj is talking about how to specify multiple connection string in one environment variable.

This

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants