brew install nvm
You should create NVM's working directory if it doesn't exist
mkdir ~/.nvm
Add the following to your shell profile e.g. ~/.profile or ~/.zshrc:
export NVM_DIR="$HOME/.nvm"
[ -s "$HOMEBREW_PREFIX/opt/nvm/nvm.sh" ] && \. "$HOMEBREW_PREFIX/opt/nvm/nvm.sh" # This loads nvm
[ -s "$HOMEBREW_PREFIX/opt/nvm/etc/bash_completion.d/nvm" ] && \. "$HOMEBREW_PREFIX/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
nvm use
npm install
Create .env file in the root of directory and add the following environment variable
DATABASE_URL="file:./dev.db"
IMPORTANT: Initialize SqlLite with Prisma and Seed the DB (In order for Application to have data to work with)
npx prisma migrate dev --name LinkedInClone
npm run dev
npm install
to install dependenciesnpm run dev
to run your app with hot reloadingnpm run build && npm run start
to compile and run a production build
npx prisma migrate dev --name <migration_name>
- to set up the DB and automatically run the seed scriptnpm run seed
- execute the seed script (found at./prisma/seed.ts
) to add data to your DB.npm run generate
- make sure the Prisma client is up to date with your DB