Database
In this step, we'll set up your database.
Planetscale
Neorepo uses Planetscale to store data. Planetscale is a fully managed database service that's built on top of MySQL. It's designed to be a drop-in replacement for MySQL, so you can use the same tools you're already familiar with.
Create a database
- Open the Planetscale dashboard
- Click the "Create Database" button
- Enter a name for your database
- Click the "Create Database" button
Get your database URL
- Open the Planetscale dashboard
- Click the database you created in the previous step
- Click the "Connect" tab
- Copy the database URL
Set up your environment variables
- Open the Vercel project you created in the previous step
- Click the "Environment Variables" tab
- Add the following environment variables:
DATABASE_URL=mysql://<username>:<password>@<host>:<port>/<database>
Create the database schema with Prisma
- Open your terminal
- Run the following command:
yarn prisma db push
This command will create the Prisma database schema for you and push it to your database.