From 8d0ef5616a7c8d03fd0cae620a0d1ed835e7c8fb Mon Sep 17 00:00:00 2001 From: Kevin Puig Date: Wed, 22 Oct 2025 01:18:32 -0400 Subject: [PATCH] Added bun dependencies + created hono template --- alarm-server/.gitignore | 34 ++++++++++++++++++++++++++++++++++ alarm-server/README.md | 15 +++++++++++++++ alarm-server/bun.lock | 34 ++++++++++++++++++++++++++++++++++ alarm-server/index.ts | 6 ++++++ alarm-server/package.json | 15 +++++++++++++++ alarm-server/tsconfig.json | 29 +++++++++++++++++++++++++++++ flake.nix | 1 + 7 files changed, 134 insertions(+) create mode 100644 alarm-server/.gitignore create mode 100644 alarm-server/README.md create mode 100644 alarm-server/bun.lock create mode 100644 alarm-server/index.ts create mode 100644 alarm-server/package.json create mode 100644 alarm-server/tsconfig.json diff --git a/alarm-server/.gitignore b/alarm-server/.gitignore new file mode 100644 index 0000000..a14702c --- /dev/null +++ b/alarm-server/.gitignore @@ -0,0 +1,34 @@ +# dependencies (bun install) +node_modules + +# output +out +dist +*.tgz + +# code coverage +coverage +*.lcov + +# logs +logs +_.log +report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# caches +.eslintcache +.cache +*.tsbuildinfo + +# IntelliJ based IDEs +.idea + +# Finder (MacOS) folder config +.DS_Store diff --git a/alarm-server/README.md b/alarm-server/README.md new file mode 100644 index 0000000..0721125 --- /dev/null +++ b/alarm-server/README.md @@ -0,0 +1,15 @@ +# alarm-server + +To install dependencies: + +```bash +bun install +``` + +To run: + +```bash +bun run index.ts +``` + +This project was created using `bun init` in bun v1.3.0. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime. diff --git a/alarm-server/bun.lock b/alarm-server/bun.lock new file mode 100644 index 0000000..19b01d7 --- /dev/null +++ b/alarm-server/bun.lock @@ -0,0 +1,34 @@ +{ + "lockfileVersion": 1, + "workspaces": { + "": { + "name": "alarm-server", + "dependencies": { + "hono": "^4.10.2", + }, + "devDependencies": { + "@types/bun": "latest", + }, + "peerDependencies": { + "typescript": "^5", + }, + }, + }, + "packages": { + "@types/bun": ["@types/bun@1.3.0", "", { "dependencies": { "bun-types": "1.3.0" } }, "sha512-+lAGCYjXjip2qY375xX/scJeVRmZ5cY0wyHYyCYxNcdEXrQ4AOe3gACgd4iQ8ksOslJtW4VNxBJ8llUwc3a6AA=="], + + "@types/node": ["@types/node@24.9.1", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-QoiaXANRkSXK6p0Duvt56W208du4P9Uye9hWLWgGMDTEoKPhuenzNcC4vGUmrNkiOKTlIrBoyNQYNpSwfEZXSg=="], + + "@types/react": ["@types/react@19.2.2", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-6mDvHUFSjyT2B2yeNx2nUgMxh9LtOWvkhIU3uePn2I2oyNymUAX1NIsdgviM4CH+JSrp2D2hsMvJOkxY+0wNRA=="], + + "bun-types": ["bun-types@1.3.0", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-u8X0thhx+yJ0KmkxuEo9HAtdfgCBaM/aI9K90VQcQioAmkVp3SG3FkwWGibUFz3WdXAdcsqOcbU40lK7tbHdkQ=="], + + "csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="], + + "hono": ["hono@4.10.2", "", {}, "sha512-p6fyzl+mQo6uhESLxbF5WlBOAJMDh36PljwlKtP5V1v09NxlqGru3ShK+4wKhSuhuYf8qxMmrivHOa/M7q0sMg=="], + + "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + + "undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="], + } +} diff --git a/alarm-server/index.ts b/alarm-server/index.ts new file mode 100644 index 0000000..08e5cf2 --- /dev/null +++ b/alarm-server/index.ts @@ -0,0 +1,6 @@ +import { Hono } from 'hono' + +const app = new Hono() +app.get('/', (c) => c.text('Hello Bun!')) + +export default app \ No newline at end of file diff --git a/alarm-server/package.json b/alarm-server/package.json new file mode 100644 index 0000000..53fb431 --- /dev/null +++ b/alarm-server/package.json @@ -0,0 +1,15 @@ +{ + "name": "alarm-server", + "module": "index.ts", + "type": "module", + "private": true, + "devDependencies": { + "@types/bun": "latest" + }, + "peerDependencies": { + "typescript": "^5" + }, + "dependencies": { + "hono": "^4.10.2" + } +} diff --git a/alarm-server/tsconfig.json b/alarm-server/tsconfig.json new file mode 100644 index 0000000..bfa0fea --- /dev/null +++ b/alarm-server/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + // Environment setup & latest features + "lib": ["ESNext"], + "target": "ESNext", + "module": "Preserve", + "moduleDetection": "force", + "jsx": "react-jsx", + "allowJs": true, + + // Bundler mode + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "noEmit": true, + + // Best practices + "strict": true, + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, + + // Some stricter flags (disabled by default) + "noUnusedLocals": false, + "noUnusedParameters": false, + "noPropertyAccessFromIndexSignature": false + } +} diff --git a/flake.nix b/flake.nix index 1f4526d..149b4ed 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,7 @@ devShells.x86_64-linux.default = pkgs.mkShell { buildInputs = with pkgs; [ libgcc + bun ]; shellHook = '' echo "Welcome to the methylphenidate dev environment!"