Skip to content

Commit 1a2191b

Browse files
committed
docs(recipes): add $ for bash commands
1 parent 84c5913 commit 1a2191b

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

content/recipes/prisma.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,35 +41,35 @@ See the [First steps](https://docs.nestjs.com/first-steps) page to learn more ab
4141
Start by installing the Prisma CLI as a development dependency in your project:
4242

4343
```bash
44-
npm install @prisma/cli --save-dev
44+
$ npm install @prisma/cli --save-dev
4545
```
4646

4747
As a best practice, it's recommended to invoke the CLI locally by prefixing it with `npx`:
4848

4949
```bash
50-
npx prisma
50+
$ npx prisma
5151
```
5252

5353
<details><summary>Expand if you're using Yarn</summary>
5454

5555
If you're using Yarn, then you can install the Prisma CLI as follows:
5656

5757
```bash
58-
yarn add @prisma/cli --dev
58+
$ yarn add @prisma/cli --dev
5959
```
6060

6161
Once installed, you can invoke it by prefixing it with `yarn`:
6262

6363
```bash
64-
yarn prisma
64+
$ yarn prisma
6565
```
6666

6767
</details>
6868

6969
Now create your initial Prisma setup using the `init` command of the Prisma CLI:
7070

7171
```bash
72-
npx prisma init
72+
$ npx prisma init
7373
```
7474

7575
This command created a new `prisma` directory with the following contents:
@@ -171,7 +171,7 @@ In this section, you'll create two new tables in your database. Run the followin
171171
**Mac OS / Linux**
172172

173173
```bash
174-
sqlite3 dev.db \
174+
$ sqlite3 dev.db \
175175
'CREATE TABLE "User" (
176176
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
177177
"name" TEXT,
@@ -190,7 +190,7 @@ CREATE TABLE "Post" (
190190
**Windows**
191191

192192
```bash
193-
sqlite3 ./prisma/dev.db
193+
$ sqlite3 ./prisma/dev.db
194194
CREATE TABLE "User" (
195195
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
196196
"name" TEXT,
@@ -214,7 +214,7 @@ Now that you created your database tables, you can _introspect_ the database to
214214
To introspect your database, run the following command in your terminal:
215215

216216
```bash
217-
npx prisma introspect
217+
$ npx prisma introspect
218218
```
219219

220220
This reads your SQL schema and translates each table into a corresponding Prisma model. Your `schema.prisma` file now looks as follows:
@@ -253,7 +253,7 @@ With your Prisma models in place, you can install and generate Prisma Client.
253253
To install Prisma Client in your project, run the following command in your terminal:
254254

255255
```bash
256-
npm install @prisma/client
256+
$ npm install @prisma/client
257257
```
258258

259259
Note that this command automatically invokes the `prisma generate` command for you. In the future, you need to run this command after _every_ change to your Prisma models to update your generated Prisma Client.
@@ -552,9 +552,8 @@ This controller implements the following routes:
552552

553553
- `/post/:id`: Delete a post by its `id`
554554

555-
556555
#### Summary
557556

558557
In this guide, you learned how to implement a use NestJS together with Prisma to implement a REST API. The controller who implements the routes of the API is calling a `PrismaService` which in turn uses Prisma Client to send queries to a database to fulfill the data needs of incoming requests.
559558

560-
If you want to learn more about Prisma, be sure to check out the [documentation](https://www.prisma.io/docs/).
559+
If you want to learn more about Prisma, be sure to check out the [documentation](https://www.prisma.io/docs/).

0 commit comments

Comments
 (0)