Skip to content

Commit

Permalink
Fix react.md (harmonize folder structure in text and code-snippet) (d…
Browse files Browse the repository at this point in the history
  • Loading branch information
SirunGameDev authored Nov 20, 2024
1 parent ce3e962 commit cd823ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions runtime/tutorials/how_to_with_npm/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ At this point the app is being served by the Vite development server. To serve
the app in production, you can build the app with Vite and then serve the built
files with Deno. To do so we'll need to update the api server to serve the built
files. We'll write some middleware to do this. In your `api` directory create a
new file called `routeStaticFilesFrom.ts` and add the following code:
new folder `util` and a new file called `routeStaticFilesFrom.ts` and add the
following code:
```ts title="routeStaticFilesFrom.ts"
import { Next } from "jsr:@oak/oak/middleware";
Expand Down Expand Up @@ -366,7 +367,7 @@ middleware:
import { Application, Router } from "@oak/oak";
import { oakCors } from "@tajpouria/cors";
import data from "./data.json" with { type: "json" };
import routeStaticFilesFrom from "./api/routeStaticFilesFrom.ts";
import routeStaticFilesFrom from "./util/routeStaticFilesFrom.ts";

const router = new Router();

Expand Down

0 comments on commit cd823ce

Please sign in to comment.