The technologies used in this project are:
- Next.js
- Postgres db (with docker)
- Prisma for orm
- Next-auth for authentication
- docker-compose up -d
- go to http://localhost:5050/ (to view the database via pgAdmin)
- enter PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD
- docker container ls (to get the CONTAINER ID of the postgres image)
- docker inspect CONTAINER ID (to find the IP of the container)
- Then inside the pgAdmin -> Add new Server
- On General tab put a name (e.g. 'test_db')
- On Connection tab enter the IP of the container on Hostname
- Username and passoword: POSTGRES_USER and POSTGRES_PASSWORD
Simply run:
npm run dev
Open http://localhost:3000 with your browser to see the result.
npx prisma migrate
npx prisma generate