Skip to content

Commit 29203b1

Browse files
committed
htmlとmjsの場所入れ替え
1 parent 4f987b3 commit 29203b1

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

docs/3-web-servers/04-server/index.mdx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,21 @@ document.write(base.replaceAll("C", "T")); // ABTBTT
210210

211211
これと `fs.readFileSync` 関数を用いることで、HTML を別のファイルに分けて保存することができるようになり、より簡単に管理することができます。
212212

213+
```html title="index.html"
214+
<!doctype html>
215+
<html lang="ja">
216+
<head>
217+
<meta charset="utf-8" />
218+
<title>Title</title>
219+
</head>
220+
<body>
221+
<ul>
222+
{users}
223+
</ul>
224+
</body>
225+
</html>
226+
```
227+
213228
```js title="main.mjs"
214229
import express from "express";
215230
import fs from "fs";
@@ -227,21 +242,6 @@ app.get("/", (request, response) => {
227242
app.listen(3000);
228243
```
229244

230-
```html title="index.html"
231-
<!doctype html>
232-
<html lang="ja">
233-
<head>
234-
<meta charset="utf-8" />
235-
<title>Title</title>
236-
</head>
237-
<body>
238-
<ul>
239-
{users}
240-
</ul>
241-
</body>
242-
</html>
243-
```
244-
245245
:::
246246

247247
{/* prettier-ignore */}

0 commit comments

Comments
 (0)