Week Log 3
Rewrite of Week Log using Next.js, Typescript, PostgreSQL and Prisma
🎨 Review obscuring code and revisit the db import refactor
21st January 2021
- Review obscuring code
- Revisit the db import refactor. Mostly getting my head back into what I was working on last time, and starting to extract the database code from the API to the lib classes.
Along the way I saw that we're doing a bunch of manual DB connection management, calling prisma.$disconnect
. The docs give an overview but no clear patterns on how to manage connections with next.js. There's a thread where people are running up against this problem which contains a few possible solutions. I started an issue to make sure I remember it and to see if we can find a solution that works for us.