Next.js Prisma Azure MySQL Starter

Next.js Prisma Azure MySQL Starter
Type: Code
Framework: Next.js
CSS: Tailwind
Database: Azure MySQL
  • Project Overview: A Next.js application integrated with Prisma for database connections to an Azure MySQL database, styled with Tailwind CSS.
  • Prerequisites:
    • Installation of Node.js.
    • Creation of an Azure database for MySQL Flexible Server, requiring a free Azure account if not already available.
  • Database Setup:
    • In the Azure portal, under MySQL Flexible Server resource, add a new database named products.
  • Starter App Setup:
    • Utilize create-next-app via npm, Yarn, or pnpm to initialize the Next.js application.
  • SSL Certificate:
    • Download the DigiCertGlobalRootCA.crt.pem and place it in the Prisma folder for secure SSL authentication.
  • MySQL Connection String:
    • Formulate the connection string using the provided admin credentials and server details, ensuring sslaccept=strict is included for SSL.
  • Environment Configuration:
    • Set the MySQL connection string as an environment variable in the Vercel project settings.
  • Database Schema Deployment:
    • Use Prisma to push the database schema to the Azure MySQL database named products.
  • Database Seeding:
    • Execute the seed script to populate the database with initial data for Products and Categories.
  • Running the App:
    • Start the application locally using npm run dev and access it at localhost:3000.
  • Deployment:
    • With the application running locally, proceed to deploy it on Vercel for wider accessibility.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.