Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in information about custom HTTP routes to docs #1601

Merged
merged 3 commits into from Sep 20, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/_advanced/custom_routes.md
Expand Up @@ -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`.
Copy link
Member

Choose a reason for hiding this comment

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

Can you add Japanese translation of the sentence to https://github.com/slackapi/bolt-js/blob/%40slack/bolt%403.12.1/docs/_advanced/ja_custom_routes.md ?

カスタムの HTTP ルートがローカル環境でどのポートからアクセスできるかを指定するために App コンストラクターに installerOptions.port というプロパティを渡すことができます。指定しない場合は、デフォルトの 3000 ポートとなります。

</div>

```javascript
Expand Down
2 changes: 2 additions & 0 deletions docs/_advanced/ja_custom_routes.md
Expand Up @@ -9,6 +9,8 @@ order: 10
`v3.7.0` から `App` を初期化する際に `customRoutes` というルートの配列を渡すことでカスタムの HTTP ルートを簡単に追加できるようになりました。

各 `CustomRoute` オブジェクトには `path` 、 `method`、 `handler` という三つのプロパティが含まれていなければなりません。 HTTP メソッドに相当する `method` は文字列または文字列の配列です。

カスタムの HTTP ルートがローカル環境でどのポートからアクセスできるかを指定するために `App` コンストラクターに `installerOptions.port` というプロパティを渡すことができます。指定しない場合は、デフォルトの `3000` ポートとなります。
</div>

```javascript
Expand Down