Docs
Database
Database
How to config your Neon database.
The project was start with PlanetScale like database. But the free tier has been recently removed.
Currently this project use Neon on the free plan. Check their pricing page for more informations.
Steps
Create Neon account
If don't have an account on Neon, just follow their steps here for create one.
Copy database url
After creating a project on Neon, copy the database URL. Choose the psql option (or copy the raw connection string) from the env tab.
Don't forget to reveal the information hidden behind the stars using the eye icon. It's not very visible in dark mode.
Paste in your .env file.
DATABASE_URL =
"postgres://alex:AbC123dEf@ep-cool-darkness-123456.us-east-2.aws.neon.tech/dbname";Push migrations
You can apply the SQL migrations to your database with the provided CLI script.
pnpm run db:migrate