Next.js@13 App-Router, React, Tailwind, Prisma, MySQL
This is a Next.js project bootstrapped with create-next-app
.
First, run the development server:
npm i
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx
. The page auto-updates as you edit the file.
This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
Clerk Authentication system integrate
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=<key>
CLERK_SECRET_KEY=<secret key>
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=<namekey>
npm install @prisma/client prisma
# or
yarn add @prisma/client prisma
npx prisma init --datasource-provider mysql
#Update your .env prisma generated mysql connection link then write your model into the schema.prisma file after that run this below cli command
npx prisma generate
# or
yarn prisma generate
npx prisma db push
DATABASE_URL="mysql://<user>:<password>@127.0.0.1:3306/<db_name>?KEY1=VALUE&KEY2=VALUE&KEY3=VALUE"