NextJS API with Cloudflare as reverse proxy
In NextJS i have created an API that writes data to my local SQLite db. In dev it works perfectly but on prod i get a 504 Gateway Timeout. My app is self hosted in a VM on a centos with pm2 and nginx. I use cloudflare only as a reverse proxy for extra security. This is where i call the API