yarn
First, configure docker file which is located in: src/docker/docker-compose.yml
POSTGRES_USER: YOUR_USERNAME
POSTGRES_PASSWORD: YOUR_PASSWORD
POSTGRES_DB: YOUR_DB
Then start docker with:
docker compose up
Configure your .env
file with your db's username, password and db:
DATABASE_URL="postgresql://{YOUR_USERNAME}:{YOUR_PASSWORD}@localhost:5432/{YOUR_DB}?schema=public"
If you want to see db tables visually, then start prisma studio:
npx prisma studio
Finally
yarn run dev
- It installs packages in parallel, so it is faster. Npm installs them sequentially
- Npm saves packages to dependencies when you pass
--save
tag into command. Yarn do this by default. - It requires less memory space.
- Yarn has offline support.