DirectoryEasy
  • Non-developers
    • Setting Up Your Development Environment
    • Setting Up GitHub
    • Vercel Deployment
    • Domain Setup
  • Developers
    • Get Started
    • Configuration
      • Main
      • Database
      • Sections and categories
      • Emails
        • Cron Jobs
      • Claudinary
      • Upstash Redis
      • OAuth with Google and GitHub
      • Google Analytics Api
      • Stripe
        • API keys
        • Stripe Webhook
      • AI
    • Landing page
      • Header
Powered by GitBook
On this page
  1. Developers
  2. Configuration

Database

PreviousMainNextSections and categories

Last updated 7 months ago

1. Create a Neon DB Account

  1. Sign Up: Go to the and sign up for an account.

  2. Create a New Database: Once logged in, create a new database instance. Note down the connection details (host, database name, username, password).

Add Your Database Credentials:

Copy

DATABASE_URL=postgresql://username:password@hostname:port/database?sslmode=require

PS: Your Directory Section names should be determined at both the config object level (/lib/config/sections.ts) and the Prisma schema level.

// prisma/schema.prisma
enum Section {
  SECTION1
  SECTION2
  SECTION3
  SECTION4
}

When you've ensured the config file and schema are aligned, run npx prisma db push to updates your database to match your Prisma schema , followed by npx prisma generate to regenerate the Prisma Client.

Neon DB website