Skip to content

Commit 71aa46f

Browse files
authored
express.static("static")からexpress.static("./public")へ変更 (#818)
1 parent 58b25d1 commit 71aa46f

File tree

42 files changed

+43
-43
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+43
-43
lines changed

docs/3-web-servers/05-server/_samples/app-use/main.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import { readFileSync } from "node:fs";
33

44
const app = express();
55
app.use((request, response) => {
6-
response.send(readFileSync("./static" + request.path, "utf-8"));
6+
response.send(readFileSync("./public" + request.path, "utf-8"));
77
});
88
app.listen(3000);

docs/3-web-servers/05-server/_samples/app-use/static/index.html renamed to docs/3-web-servers/05-server/_samples/app-use/public/index.html

File renamed without changes.

docs/3-web-servers/05-server/_samples/app-use/static/script.js renamed to docs/3-web-servers/05-server/_samples/app-use/public/script.js

File renamed without changes.

docs/3-web-servers/05-server/_samples/app-use/static/sub/index.html renamed to docs/3-web-servers/05-server/_samples/app-use/public/sub/index.html

File renamed without changes.

docs/3-web-servers/05-server/_samples/app-use/static/sub/script.js renamed to docs/3-web-servers/05-server/_samples/app-use/public/sub/script.js

File renamed without changes.

docs/3-web-servers/05-server/_samples/static-hosting-naive/main.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ import { readFileSync } from "node:fs";
33
const app = express();
44

55
app.get("/", (request, response) => {
6-
response.send(readFileSync("static/index.html", "utf-8"));
6+
response.send(readFileSync("./public/index.html", "utf-8"));
77
});
88
app.get("/script.js", (request, response) => {
9-
response.send(readFileSync("static/script.js", "utf-8"));
9+
response.send(readFileSync("./public/script.js", "utf-8"));
1010
});
1111
app.get("/sub/", (request, response) => {
12-
response.send(readFileSync("static/sub/index.html", "utf-8"));
12+
response.send(readFileSync("./public/sub/index.html", "utf-8"));
1313
});
1414
app.get("/sub/script.js", (request, response) => {
15-
response.send(readFileSync("static/sub/script.js", "utf-8"));
15+
response.send(readFileSync("./public/sub/script.js", "utf-8"));
1616
});
1717

1818
app.listen(3000);

docs/3-web-servers/05-server/_samples/static-hosting-naive/static/index.html renamed to docs/3-web-servers/05-server/_samples/static-hosting-naive/public/index.html

File renamed without changes.

docs/3-web-servers/05-server/_samples/static-hosting-naive/static/script.js renamed to docs/3-web-servers/05-server/_samples/static-hosting-naive/public/script.js

File renamed without changes.

docs/3-web-servers/05-server/_samples/static-hosting-naive/static/sub/index.html renamed to docs/3-web-servers/05-server/_samples/static-hosting-naive/public/sub/index.html

File renamed without changes.

docs/3-web-servers/05-server/_samples/static-hosting-naive/static/sub/script.js renamed to docs/3-web-servers/05-server/_samples/static-hosting-naive/public/sub/script.js

File renamed without changes.

0 commit comments

Comments
 (0)