Overview
This is a nice and sweet tutorial on connecting to your Vercel Postgres database with IntelliJ's Database plugin.
I work for Akkio, where I'm building out a no-code predictive AI platform. If you're looking to harness the power of AI without needing a data scientist, give us a try!
Step 1: Create a Database
First, create a PostgreSQL database through Vercel.
This will automatically add all the relevant environment variables you'll need to the Vercel project as well, which will come in handy a bit later.
Step 2: Find Your Credentials
The way I recommend doing this is as follows.
-
Install the Vercel CLI.
npm i -g vercel
should do the trick. -
Link your project.
vercel link
will walk you through the process. -
Pull your variables down.
vercel env pull
is the command you're looking for.
At this point, you'll have a .env
file locally that you can use to your exact values. The relevant variables you're looking for are POSTGRES_USER
, POSTGRES_HOST
, POSTGRES_PASSWORD
, and POSTGRES_DATABASE
.
Step 3: Plug them In!
From here, create a new PostgreSQL connection in the Database plugin in IntelliJ. The screen will look like this:
Fill this in with the details from above. Hit "Test Connection" and make sure everything works!
Top comments (0)