Trouble getting drizzle to run on server side in nextjs

Hi, having some trouble getting drizzle db connection to run on server side as documentation shows. i followed the steps multiple times and each time only leads to working if the environment variables are prefixed with NEXT_PUBLIC or hardcoded (node env variables not loading) and would have to be exposed to browser which i dont want to do. is there a reason its only running on client side calls? i have tried moving the files to different areas in my next project, including the server folder but no luck. the steps followed was from planetscale mysql instructions.
image.png
Was this page helpful?