commit d001298e80eeec0e1ee84061a0547f494c1385af Author: Mohammad Mahdi Date: Wed Aug 26 13:05:08 2026 +0330 feat: Initialize Hono bundle template for edge workers diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..53d4157 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +# deps +node_modules/ + +dist/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..6dd13e7 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +To install dependencies: +```sh +bun install +``` + +To run: +```sh +bun run dev +``` + +open http://localhost:3000 diff --git a/bun.lock b/bun.lock new file mode 100644 index 0000000..92dcea0 --- /dev/null +++ b/bun.lock @@ -0,0 +1,26 @@ +{ + "lockfileVersion": 1, + "configVersion": 1, + "workspaces": { + "": { + "name": "hono-bundle-template", + "dependencies": { + "hono": "^4.13.5", + }, + "devDependencies": { + "@types/bun": "latest", + }, + }, + }, + "packages": { + "@types/bun": ["@types/bun@1.4.0", "", { "dependencies": { "bun-types": "1.4.0" } }, "sha512-K+lZULY23vRgK/CfTjFIV+tyifaNdSMlPh9j+6mQ/cLfpOznLyAuzgV/JQysyECpkBQLVMSyvjlr2fBUSA9wFQ=="], + + "@types/node": ["@types/node@26.3.0", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-L3fgrnchriRC2ExBflb8j4uZZURHZfQsmQeyVzhjcHW4kkwVyo8/0h1B2MVzMTrYUJYu6G7EWs14hW/L9putqw=="], + + "bun-types": ["bun-types@1.4.0", "", { "dependencies": { "@types/node": "*" } }, "sha512-iIKw23BspnQQYd3prITOBxeUsxBHnwzX6YJfGMuNOZzeNcMmVqzIIVGRm1l69ogaPQmb4wB6BN8mA5bE9YuC5Q=="], + + "hono": ["hono@4.13.5", "", {}, "sha512-O6+/eCYRkzzzy0rPWwKLiGBR1nFuUPZynnwjxN1MBA62NNqbT0wQEzQyK2gSO5yDIDB336sXQleAhOHrzlYyKw=="], + + "undici-types": ["undici-types@8.3.0", "", {}, "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ=="], + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..295e893 --- /dev/null +++ b/package.json @@ -0,0 +1,13 @@ +{ + "name": "hono-bundle-template", + "scripts": { + "dev": "bun run --hot src/index.ts", + "bundle": "bun build ./src/index.ts --outdir ./dist --bundle --target browser --minify --format=esm" + }, + "dependencies": { + "hono": "^4.13.5" + }, + "devDependencies": { + "@types/bun": "latest" + } +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..3191383 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,9 @@ +import { Hono } from 'hono' + +const app = new Hono() + +app.get('/', (c) => { + return c.text('Hello Hono!') +}) + +export default app diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..dbaab1a --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "strict": true, + "types": ["bun"], + "jsx": "react-jsx", + "jsxImportSource": "hono/jsx" + } +} \ No newline at end of file