Skip to content

Commit

Permalink
Update to use tsx for executing scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sis0k0 committed May 27, 2024
1 parent c76e064 commit 1db22c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/60-schema-validation/2-validate-users.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ You need to run the script to apply the schema to the `users` collection.

```sh
cd server
node dist/schema-validation/apply-schema.js
npx tsx src/schema-validation/apply-schema.ts

```

Expand Down Expand Up @@ -112,7 +112,7 @@ Now that the schema validation is enabled for the `users` collection, you can te
3. Execute the script by running the following command.
```node
node dist/schema-validation/test-validation.js
npx tsx src/schema-validation/test-validation.ts
```
The error describes that the `name` and `isAdmin` fields are required but missing in the document you tried to insert.
Expand Down
2 changes: 1 addition & 1 deletion docs/60-schema-validation/3-validate-authors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This is an advanced exercises that requires you to write code. If you get stuck
1. Execute the script again to apply the schema to the `authors` collection.
```bash
cd server
node dist/schema-validation/apply-schema.js
npx tsx src/schema-validation/apply-schema.ts

```
1. Finally, test the schema validation by modifying the `server/src/schema-validation/test-validation.ts` script. Inserting a document in the `authors` collection.

0 comments on commit 1db22c2

Please sign in to comment.