@@ -155,21 +155,21 @@ if (import.meta.main) {
155155```
156156
157157You can run the API server with
158- ` deno run --allow-env --allow-net server/main.ts ` . We'll create a task to run
159- this command in the background and update the dev task to run both the React app
160- and the API server.
158+ ` deno run --allow-env --allow-net --allow-read server/main.ts ` . We'll create a
159+ task to run this command in the background and update the dev task to run both
160+ the React app and the API server.
161161
162- In your ` package.json ` file, update the ` scripts ` field to include the
163- following:
162+ In your ` deno.json ` file, update the ` tasks ` field to include the following:
164163
165164``` diff title="deno.json"
166165{
167166 "tasks": {
168- + "dev": "deno run -A --node-modules-dir=auto npm:vite & deno run server:start",
169- "build": "deno run -A --node-modules-dir=auto npm:vite build",
167+ + "dev": "deno run -A npm:vite & deno run server:start",
168+ "build": "deno run -A npm:vite build",
170169 "server:start": "deno run -A --node-modules-dir --watch ./server/main.ts",
171170 "serve": "deno run build && deno run server:start"
172- }
171+ },
172+ + "nodeModulesDir": "auto",
173173```
174174
175175If you run ` deno run dev ` now and visit ` localhost:8000/api/dinosaurs ` , in your
@@ -359,7 +359,7 @@ To run the app use the task you set up earlier
359359deno run dev
360360```
361361
362- Navigate to the local Vite server in your browser (` localhost:5173 ` ) and you
362+ Navigate to the local Vite server in your browser (` localhost:3000 ` ) and you
363363should see the list of dinosaurs displayed which you can click through to find
364364out about each one.
365365
0 commit comments