S
SolidJSβ€’6mo ago
voxel8

I have a question when building npm create solid with-prisma template.

In npm run dev, prisma with url="File:./dev.db" works fine, but when you run npm run build and start it with node.output/server/index.mjs, the path is not found. How do I specify the path at build time?
2 Replies
Katja (katywings)
Katja (katywings)β€’6mo ago
I also stumbled upon this and came up with a little trick πŸ˜…: https://discord.com/channels/722131463138705510/1243486537438461952/1243486985562095677 P.S. if your prisma schema is in a subfolder, I recommend you to make the path relative to that subfolder ☺️
voxel8
voxel8OPβ€’6mo ago
The DATABASE_URL in .env was not read, so import dotenv from 'dotenv' I read process.env ['DATABASE_URL'] and finally solved it. Thank you.😊
Want results from more Discord servers?
Add your server