This is a Next.js project bootstrapped with create-next-app.

Setup locally

Clone this repository:

git clone git@github.com:ruheni/fulltextsearch-w-prisma.git
yarn

Modify the existing env.example to a .env file:

mv .env.example .env

Update your database connection string in .env. This example requires a PostgreSQL database.

DATABASE_URL="postgresql://user:password@localhost:5432/mydb?schema=public"

Create and seed the database:

npx prisma migrate dev
npx prisma db seed  # Running migrate dev on a new database also triggers seeding the database so you don't have to run the command

If the seeding was successful, you'll see the titles logged on the terminal.

View the data on Prisma Studio:

npx prisma studio

Prisma studio may take a while to load because the content field of the Book contains the contents of the entire book in plain text format which is really BIG

Start the application:

npm run dev