You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 14, 2021. It is now read-only.
We currently encourage users to hardcode their DB credentials into the schema.prisma by this being the default getting started experience. We should strongly discourage developers to do so and therefore adjust our getting started experience + examples accordingly in order to encourage the use of environment variables.
In order to not degrade the DX during local development, I'm suggesting the following change in Prisma Client.
Proposal
Prisma Client should auto-import required env vars (i.e. env vars referenced in the Prisma schema in the datasource.url property) from the .env file during development.
Implementation notes: It's important that this functionality/feature takes the lowest precedent (i.e. if the user provides their own env vars, call require('dotenv') or similar themselves, this feature shouldn't conflict in any way)
It should not make the env vars available to the entire Node process but just the query engine.
Context
We currently encourage users to hardcode their DB credentials into the
schema.prismaby this being the default getting started experience. We should strongly discourage developers to do so and therefore adjust our getting started experience + examples accordingly in order to encourage the use of environment variables.In order to not degrade the DX during local development, I'm suggesting the following change in Prisma Client.
Proposal
datasource.urlproperty) from the.envfile during development.require('dotenv')or similar themselves, this feature shouldn't conflict in any way)