Skip to content
This repository was archived by the owner on Dec 2, 2023. It is now read-only.

Commit 005e996

Browse files
authored
Merge pull request #7 from kei711/feature/health-check
2 parents df24ddd + 181c217 commit 005e996

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.env.sample

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ SLACK_APP_TOKEN
33

44
DOCBASE_TEAM_NAME
55
DOCBASE_ACCESS_TOKEN
6+
7+
PORT=3000

src/index.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,18 @@ import { DocbaseClient } from './DocbaseClient';
66
const app = new App({
77
socketMode: true,
88
token: process.env.SLACK_BOT_TOKEN,
9-
appToken: process.env.SLACK_APP_TOKEN
9+
appToken: process.env.SLACK_APP_TOKEN,
10+
port: process.env.PORT ? +process.env.PORT : 3000,
11+
customRoutes: [
12+
{
13+
path: '/healthz',
14+
method: ['GET'],
15+
handler: (req, res) => {
16+
res.writeHead(200);
17+
res.end('OK');
18+
},
19+
},
20+
],
1021
});
1122

1223
const docbase = new DocbaseClient();

0 commit comments

Comments
 (0)