Skip to content

Commit

Permalink
fix: url description for image of react.md (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
regchiu committed Nov 3, 2023
1 parent 0b1bf5f commit 305e2ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions runtime/manual/node/how_to_with_npm/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ router
})
.get("/api/:dinosaur", (context) => {
if (context?.params?.dinosaur) {
const found = data.find(item => item.name.toLowerCase() === context.params.dinosaur.toLowerCase());
const found = data.find((item) =>
item.name.toLowerCase() === context.params.dinosaur.toLowerCase()
);
if (found) {
context.response.body = found;
} else {
} else {
context.response.body = "No dinosaurs found.";
}
}
Expand All @@ -85,7 +87,7 @@ will return dinosaur information based on the route. Let's start the API server:
deno run --allow-env --allow-net api/main.ts
```

If we go to `localhost:8000/api`, we see:
If we go to `localhost:8000`, we see:

![json response of dinosaurs](../../images/how-to/react/dinosaur-api.png)

Expand Down
2 changes: 1 addition & 1 deletion runtime/tutorials/how_to_with_npm/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ will return dinosaur information based on the route. Let's start the API server:
deno run --allow-env --allow-net api/main.ts
```

If we go to `localhost:8000/api`, we see:
If we go to `localhost:8000`, we see:

![json response of dinosaurs](../../manual/images/how-to/react/dinosaur-api.png)

Expand Down

0 comments on commit 305e2ee

Please sign in to comment.