nitro icon indicating copy to clipboard operation
nitro copied to clipboard

Database secret

Open HigherOrderLogic opened this issue 7 months ago • 4 comments

Describe the feature

As title suggests, allows using secret/environment variables to connect to database with Nitro.

Additional information

  • [ ] Would you be willing to help implement this feature?

HigherOrderLogic avatar May 31 '25 16:05 HigherOrderLogic

Can you share more details? 🙏 Seems what you need is just Runtime configuration

kricsleo avatar Jun 01 '25 03:06 kricsleo

Seems what you need is just Runtime configuration

Runtime config is not useful in this case, since the database connector options has to be specified in Nitro/Nuxt config file.

HigherOrderLogic avatar Jun 01 '25 04:06 HigherOrderLogic

using process.env.NITRO_DATABASE_URL tends to work for me inside the nitro config file as a value for the url property

malgamves avatar Jun 02 '25 17:06 malgamves

NITRO_DATABASE_URL

it not passed to useDatabase() database configuration.

alex-eri avatar Aug 09 '25 10:08 alex-eri