NuxtN
Nuxt11mo ago
7 replies
qb1t

Nuxt /server api databse connection

Hi I am new to writing server side stuff with nuxt and I was just working on my first api and I got stuck on where should I initiate the connection to my database. I don't want to create the connection each time an endpoint is called I don't really like that and I want to do things the right way.
So what is the right place to initiate the database connection?
Was this page helpful?