alpha
Login
or
Join now
dunkirk.sh
/
smokie
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
chore: move to bun serve
author
Kieran Klukas
date
1 year ago
(Apr 18, 2025, 5:48 PM -0400)
commit
31717830
317178304ece1e925d5fa55da717dbf431808120
parent
d5bac175
d5bac1758947d5abf9cdf7d2d5f71188cb151a95
+9
-14
1 changed file
Expand all
Collapse all
Unified
Split
src
index.ts
+9
-14
src/index.ts
Reviewed
···
1
1
import { SlackApp } from "slack-edge";
2
2
3
3
-
import * as features from "./features/index";
3
3
+
import { takes } from "./features/index";
4
4
5
5
import { t } from "./libs/template";
6
6
import { blog } from "./libs/Logger";
···
52
52
});
53
53
const slackClient = slackApp.client;
54
54
55
55
-
console.log(`⚒️ Loading ${Object.entries(features).length} features...`);
56
56
-
for (const [feature, handler] of Object.entries(features)) {
57
57
-
console.log(`📦 ${feature} loaded`);
58
58
-
if (typeof handler === "function") {
59
59
-
handler();
60
60
-
}
61
61
-
}
55
55
+
takes();
62
56
63
63
-
export default {
57
57
+
Bun.serve({
64
58
port: process.env.PORT || 3000,
59
59
+
development: environment === "development",
60
60
+
routes: {
61
61
+
"/": new Response(`Hello World from ${name}@${version}`),
62
62
+
"/health": new Response("OK"),
63
63
+
},
65
64
async fetch(request: Request) {
66
65
const url = new URL(request.url);
67
66
const path = `/${url.pathname.split("/")[1]}`;
68
67
69
68
switch (path) {
70
70
-
case "/":
71
71
-
return new Response(`Hello World from ${name}@${version}`);
72
72
-
case "/health":
73
73
-
return new Response("OK");
74
69
case "/slack":
75
70
return slackApp.run(request);
76
71
case "/api":
···
79
74
return new Response("404 Not Found", { status: 404 });
80
75
}
81
76
},
82
82
-
};
77
77
+
});
83
78
84
79
console.log(
85
80
`🚀 Server Started in ${