Skip to content

Commit c9137e4

Browse files
feat: slackus uptime
1 parent 92d0980 commit c9137e4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
SLACK_TOKEN=xoxb-
22
SLACK_CHANNEL=C0815508A59
3-
SLACK_SIGNING_SECRET=
3+
SLACK_SIGNING_SECRET=
4+
SLACKUS_URL=

src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ const db = new JSONdb("./db.json");
1212
app.db = db;
1313

1414
loadEvents(app);
15+
setInterval(() => {
16+
fetch(process.env.SLACKUS_URL)
17+
}, 2.5 * 1000)
1518

1619
app.start(process.env.PORT || process.env.SERVER_PORT || 3000);
1720
console.log(`Started on port ${process.env.PORT || process.env.SERVER_PORT || 3000}`);

0 commit comments

Comments
 (0)