Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions docs/3-web-servers/04-module/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ import add from "./sub.mjs";
console.log(add(3, 4));
```

<ViewSource url={import.meta.url} path="_samples/default-export" />
<ViewSource
url={import.meta.url}
path="_samples/default-export"
noCodeSandbox
/>

:::tip[名前付きエクスポート]

Expand All @@ -56,7 +60,7 @@ console.log(add(3, 4));
console.log(subtract(4, 3));
```

<ViewSource url={import.meta.url} path="_samples/named-export" />
<ViewSource url={import.meta.url} path="_samples/named-export" noCodeSandbox />

:::

Expand All @@ -82,7 +86,11 @@ const add = sub.add;
console.log(add(3, 4));
```

<ViewSource url={import.meta.url} path="_samples/commonjs-module" />
<ViewSource
url={import.meta.url}
path="_samples/commonjs-module"
noCodeSandbox
/>

:::

Expand Down
3 changes: 3 additions & 0 deletions docs/3-web-servers/05-server/_samples/app-use/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"name": "express-server",
"scripts": {
"start": "node main.mjs"
},
"dependencies": {
"express": "^5.1.0"
}
Expand Down
Loading