Reputation: 201
I'm new to web development and currently learning Next, my question is how will I be able to access the my database (PostgreSQL) once I've deployed my application (both from and back) to Vercel.
Is there anyway, or should I create an API prior to deployment that will generate a report for the contents of my DB.
Upvotes: 0
Views: 97
Reputation: 24700
You can access your database from your Vercel deployment the same way you access it from local development on your machine, by setting Environment Variables.
With Next.js, you can create a .env.local
file with names/values and use those with next dev
.
With Vercel, you add those names/values to in the Project Settings under Environment Variables.
Upvotes: 1