diff --git a/docs/_advanced/custom_routes.md b/docs/_advanced/custom_routes.md index 729b67977..31a613989 100644 --- a/docs/_advanced/custom_routes.md +++ b/docs/_advanced/custom_routes.md @@ -9,6 +9,8 @@ order: 10 As of `v3.7.0`, custom HTTP routes can be easily added by passing in an array of routes as `customRoutes` when initializing `App`. Each `CustomRoute` object must contain three properties: `path`, `method`, and `handler`. `method`, which corresponds to the HTTP verb, can be either a string or an array of strings. + +To determine what port the custom HTTP route will be available on locally, you can specify an `installerOptions.port` property in the `App` constructor. Otherwise, it will default to port `3000`. ```javascript diff --git a/docs/_advanced/ja_custom_routes.md b/docs/_advanced/ja_custom_routes.md index 8a011bad5..fa8e3d202 100644 --- a/docs/_advanced/ja_custom_routes.md +++ b/docs/_advanced/ja_custom_routes.md @@ -9,6 +9,8 @@ order: 10 `v3.7.0` から `App` を初期化する際に `customRoutes` というルートの配列を渡すことでカスタムの HTTP ルートを簡単に追加できるようになりました。 各 `CustomRoute` オブジェクトには `path` 、 `method`、 `handler` という三つのプロパティが含まれていなければなりません。 HTTP メソッドに相当する `method` は文字列または文字列の配列です。 + +カスタムの HTTP ルートがローカル環境でどのポートからアクセスできるかを指定するために `App` コンストラクターに `installerOptions.port` というプロパティを渡すことができます。指定しない場合は、デフォルトの `3000` ポートとなります。 ```javascript