This is a T3 Stack project
- MySQL for the database
- Prisma for ORM
- NextJS fullstack framework
- AntDesign UI framework
-
Install Node.js
-
Navigate to the project
cd milestone3
- Install the packages
npm install
- Create an
.env
at the same level of the.env.example
file
touch .env
- 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"
- 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"
- Generate the database models with prisma
npx prisma migrate dev --name init
-
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.
-
Run the development server, go to http://localhost:3000/
npm run dev