Skip to content

Commit

Permalink
Added read me prisma documentation and .env.example file
Browse files Browse the repository at this point in the history
  • Loading branch information
MocicaRazvan committed Jan 15, 2024
1 parent 1845011 commit 35af962
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DATABASE_URL="postgresql://db_username:db_user_pwd@localhost:db_port/db?schema=db_schema"
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,20 @@ To check for code issues using [ESLint](https://eslint.org/), run:
```bash
npm run lint
```

To run run prisma, you have two steps:

- First is to generate the schema in the database:
- To just generate the database and not create a migration:
```bash
npx prisma db push
```

- To generate the database and also create a migration:
```bash
npx prisma migrate dev --name init
```
- Second is to generate the prisma client. This step is required also after every pull because prisma client is stored in the `node_modules` folder which is in the `.gitignore`
```bash
npx prisma generate
```

0 comments on commit 35af962

Please sign in to comment.