gnormal / gnorm

A database-first code generator for any language
https://gnorm.org
Other
488 stars 40 forks source link

Optionally Override gnorm.toml ConnStr via cli flag #51

Open daniel-reed opened 6 years ago

daniel-reed commented 6 years ago

This would allow using db credentials without putting them in a config file.

natefinch commented 6 years ago

FYI, you can use environment variables transparently in gnorm.tom configuration values, so a ConnStr that has -p=$DB_PASSWORD will do the right thing.

However, I agree that being able to specify the connection string on the CLI is probably also good.

daniel-reed commented 6 years ago

Thanks for the tip on the environment variables. I'll go that route for now. I'll probably have a pull request for the cli flag next weekend if you agree it has value.

natefinch commented 6 years ago

definitely think the cli flag would be good, and would love a PR. Maybe -d and --database? unfortunately, -c is already taken. if you could add it to preview and gen, that would be great.