- Nextjs: A full stack framework (frontend + backend)
- Prisma: Database ORM (the library that communicate with the database)
- TypeScript: Javascript with small extra features (such as types and interfaces)
- MySQL: the database used
- Docker Desktop
- Make
or run this command
winget install GnuWin32.Make
- Postman or Insomnia or RapidAPI or generally any API Client
First run:
make up
then open http:https://localhost:3000 with your browser to see the result.
to access the shell inside the container you can run:
make
or you can restart the containers by running:
make up-recreate
you can also connect to the MySQL server on localhost:3306
using these credentials:
- username:
root
- password:
root
After you download the project, run:
npm install
and then make sure variables in .env
file match with the database credentials
DATABASE_URL="mysql:https://app:password@mysql:3306/upm-market"
DB_USERNAME="app"
DB_PASSWORD="password"
DB_DATABASE="upm-market"
please make sure you also updated the DATABASE_URL
variable like this (without {}
):
DATABASE_URL="mysql:https://{USERNAME}:{PASSWORD}@mysql:{PORT}/{DATABASE NAME}"
after you're done, make sure to run these two commands
npx prisma generate
npx prisma db push --force-reset
then run:
npm run dev
then open http:https://localhost:3000 with your browser to see the result.