@kanjijs/platform-bun 0.2.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +15 -0
  2. package/package.json +19 -0
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ // @bun
2
+ // src/index.ts
3
+ class KanjijsServer {
4
+ static listen(app, options = {}) {
5
+ const port = options.port || 3000;
6
+ console.log(`\uD83D\uDE80 Kanjijs server running on http://localhost:${port}`);
7
+ return Bun.serve({
8
+ port,
9
+ fetch: (req) => app.fetch(req)
10
+ });
11
+ }
12
+ }
13
+ export {
14
+ KanjijsServer
15
+ };
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@kanjijs/platform-bun",
3
+ "version": "0.2.0-beta.1",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "files": [
8
+ "dist",
9
+ "README.md",
10
+ "LICENSE"
11
+ ],
12
+ "scripts": {
13
+ "build": "bun build src/index.ts --outdir dist --target bun"
14
+ },
15
+ "dependencies": {
16
+ "@kanjijs/platform-hono": "workspace:*",
17
+ "hono": "^4.0.0"
18
+ }
19
+ }