Regarding e2e instead of running separated databas...
# orm-help
r
Regarding e2e instead of running separated database connection with same credentials I was wondering if I can make a condition based on the NODE_ENV content for example, in my node's application I have a simple condition to map the development environment like that:
r
You can directly set the URL here as per the
NODE_ENV
variable.
👀 1
r
Do you mean I can use the PrismaClient for dynamically change the URL instead of doing it via the prisma.scheme?
r
Yeah.
r
looks like there's another issue regarding generating the prisma client on e2e environment
sorry
I was meaning the datatable in the db not the prisma client in the node_modules
r
What’s the issue?
r
looks like no datatables exist in the db
there has to be another step for building the datatables before inserting or working with client operations (I am guessing)
like the prisma db push
r
I have set it up in the following manner: https://github.com/ryands17/nexus-introspection/blob/main/prisma/prisma-test-environment.js#L21-L22 Overriding
process.env
and setting the required URL.
r
cool I saw that you directly executed db migrate schema thanks for showing me that
💯 1