/milestone-3

Primary LanguageTypeScript

Milestone 3

This is a T3 Stack project

  • MySQL for the database
  • Prisma for ORM
  • NextJS fullstack framework
  • AntDesign UI framework

Installation

  1. Install Node.js

  2. Navigate to the project

cd milestone3
  1. Install the packages
npm install
  1. Create an .env at the same level of the .env.example file
touch .env
  1. Copy the example file .env.example text into the .env file
DATABASE_URL="mysql://[USERNAME]:[PASSWORD]@[URL]:[PORT]/[DB NAME]?schema=public"

NEXTAUTH_URL="http://localhost:3000"

NEXTAUTH_SECRET="secret string here"
  1. Replace DATABASE_URL with your MySQL database information that is locally hosted on your machine

Example

DATABASE_URL="mysql://root:password123@localhost:3306/milestone3?schema=public"
  1. Generate the database models with prisma
npx prisma migrate dev --name init
  1. Load in the role tables with ID 1 being instructor and ID 2 being student. Sign in requires that these tables are here for referential integrity.

  2. Run the development server, go to http://localhost:3000/

npm run dev