Skip to content

Conversation

@chelproc
Copy link
Contributor

@chelproc chelproc commented Jun 1, 2024

Express の章を大幅に改定し、HTTP に対する理解を深められる内容にした。

  • クライアントとサーバーの関係に関する図を追加した
  • Express インストールから起動までの流れを動画にした
  • 最初の例を hello world だけでなくハイパーリンクを含む例にした
  • URLに関する説明を追加した
  • 処理の流れを図からテキストに変更した (図を作る余裕がなかった...)
  • 確認問題を追加した
  • scriptタグなどにより複数のリクエストが発行される例を追加した
  • express.static に関する説明を追加した

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 1, 2024

Deploying utcode-learn with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2e78852
Status: ✅  Deploy successful!
Preview URL: https://5525f57f.utcode-learn.pages.dev
Branch Preview URL: https://restructure-express.utcode-learn.pages.dev

View logs

@chelproc chelproc force-pushed the restructure-express branch from 655c087 to ad49567 Compare June 1, 2024 15:13
@chelproc chelproc marked this pull request as ready for review June 1, 2024 15:18
@chelproc chelproc changed the title WIP: Express の章の再構成 Express の章の再構成 Jun 1, 2024

app.get("/", (request, response) => {
response.send("Hello World");
response.send('Hello World <a href="./lang/ja">日本語</a>');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

他の場所では Hello World! となっているので、統一してください。

- `href` 属性が相対パスの形式で指定されていれば、現在のパスを基準に [Linux における相対パス](/docs/web-servers/linux-commands/#パス)と同様の方法で URL を更新します。この例では、更新前のパスが `/` で、`href` 属性には `./lang/ja` が指定されているため、更新後のパスは `/lang/ja` になり、URL は `http://localhost:3000/lang/ja` に変化します。
8. 2 から 5 までの手順が、`/lang/ja` というパスに対して行われます。

### 確認問題
Copy link
Contributor

@aster-void aster-void Jun 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確認問題には解答例をつけてください。

@chelproc
Copy link
Contributor Author

chelproc commented Jun 2, 2024

@aster-void 細かいところは後で対応するので構成が問題ないかだけ先に確認してほしいです!

[`Request`](https://expressjs.com/ja/api.html#req) オブジェクトにどのような情報が含まれているか覗いてみましょう。

:::
## HTML に指定された外部リソースの取得
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここの章の終わりに最終的に伝えたいことを明示してもいいかもしれません。
「わかったけど、だから?」となる人が出そうな気がします。

@chvmvd
Copy link
Contributor

chvmvd commented Jun 2, 2024

全部見て、議題に上がりそうなところおよび、気になったところをコメントしました。他は良いかと思います。

@chelproc chelproc force-pushed the restructure-express branch from 1da8e92 to 9be73c6 Compare June 2, 2024 14:17
@chelproc chelproc force-pushed the restructure-express branch from 9be73c6 to af883ea Compare June 2, 2024 14:19
@chelproc chelproc force-pushed the restructure-express branch from eb3c323 to 2e78852 Compare June 2, 2024 15:01
@chelproc chelproc requested review from aster-void and chvmvd June 2, 2024 22:42
Copy link
Contributor

@chvmvd chvmvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

とりあえずよさそうです。

@chvmvd
Copy link
Contributor

chvmvd commented Jun 3, 2024

リリースしちゃうので、マージします。

@chvmvd chvmvd merged commit e4e5df5 into master Jun 3, 2024
@chvmvd chvmvd deleted the restructure-express branch June 3, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants