Starting steps:-
- To start the postgres database ->
docker-compose up -d
- Run
npx prisma migrate dev --name init
to sync the prisma scheme and the database tables - Then use
yarn dev
to start the server at 3000
Getting access to the database through terminal:-
- Start a shell with
docker exec -it postgres_container /bin/bash
- Use the
psql -U root -d tax-nextjs
command to connect with database
Post Gres common commands:-
- \d to get the list of tables in the current database
- SELECT * from "Table Name" To get the content of table