Hi, I’m quite new to prisma. Is there any example ...
# prisma-client
h
Hi, I’m quite new to prisma. Is there any example project using prisma in node.js/express with sqlite? And not sure if I should create the prisma client only once or in each service files?
a
The start from scratch is a decent starting point, you'd need to swap out the postgres instructions for SQLite
You should only create the prisma client once! This could be in the same file where you bootstrap Express
and then you'll reuse it by attaching it as express middleware, passing it to future functions, etc.
Each prisma client needs its own database connection, so you'll eventually run into issues if you're constantly instantiating new ones
n