From db8a03eee8be961e490fdd9fc3118aa0b862c551 Mon Sep 17 00:00:00 2001
From: poop <noahedwardhall@gmail.com>
Date: Fri, 17 Nov 2023 14:54:36 -0800
Subject: [PATCH] add hono template

---
 apps/hono/.gitignore            | 179 ++++++++++++++++++++++++++++++++
 apps/hono/README.md             |   7 ++
 apps/hono/api.sh                |   4 +
 apps/hono/api/README.md         |   8 ++
 apps/hono/api/bun.lockb         | Bin 0 -> 1573 bytes
 apps/hono/api/bunfig.toml       |  10 ++
 apps/hono/api/package.json      |  11 ++
 apps/hono/api/src/index.ts      |   7 ++
 apps/hono/api/src/test/setup.ts |  17 +++
 apps/hono/api/tsconfig.json     |  31 ++++++
 apps/hono/docker-compose.yaml   |   8 ++
 apps/hono/tsconfig.json         |  31 ++++++
 12 files changed, 313 insertions(+)
 create mode 100644 apps/hono/.gitignore
 create mode 100644 apps/hono/README.md
 create mode 100755 apps/hono/api.sh
 create mode 100644 apps/hono/api/README.md
 create mode 100755 apps/hono/api/bun.lockb
 create mode 100644 apps/hono/api/bunfig.toml
 create mode 100644 apps/hono/api/package.json
 create mode 100644 apps/hono/api/src/index.ts
 create mode 100644 apps/hono/api/src/test/setup.ts
 create mode 100644 apps/hono/api/tsconfig.json
 create mode 100644 apps/hono/docker-compose.yaml
 create mode 100644 apps/hono/tsconfig.json

diff --git a/apps/hono/.gitignore b/apps/hono/.gitignore
new file mode 100644
index 0000000..1009b20
--- /dev/null
+++ b/apps/hono/.gitignore
@@ -0,0 +1,179 @@
+##### custom
+*tsbuildinfo
+
+##### default
+# Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore
+
+# Logs
+
+logs
+_.log
+npm-debug.log_
+yarn-debug.log*
+yarn-error.log*
+lerna-debug.log*
+.pnpm-debug.log*
+
+# Diagnostic reports (https://nodejs.org/api/report.html)
+
+report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
+
+# Runtime data
+
+pids
+_.pid
+_.seed
+\*.pid.lock
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+
+lib-cov
+
+# Coverage directory used by tools like istanbul
+
+coverage
+\*.lcov
+
+# nyc test coverage
+
+.nyc_output
+
+# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
+
+.grunt
+
+# Bower dependency directory (https://bower.io/)
+
+bower_components
+
+# node-waf configuration
+
+.lock-wscript
+
+# Compiled binary addons (https://nodejs.org/api/addons.html)
+
+build/Release
+
+# Dependency directories
+
+node_modules/
+jspm_packages/
+
+# Snowpack dependency directory (https://snowpack.dev/)
+
+web_modules/
+
+# TypeScript cache
+
+\*.tsbuildinfo
+
+# Optional npm cache directory
+
+.npm
+
+# Optional eslint cache
+
+.eslintcache
+
+# Optional stylelint cache
+
+.stylelintcache
+
+# Microbundle cache
+
+.rpt2_cache/
+.rts2_cache_cjs/
+.rts2_cache_es/
+.rts2_cache_umd/
+
+# Optional REPL history
+
+.node_repl_history
+
+# Output of 'npm pack'
+
+\*.tgz
+
+# Yarn Integrity file
+
+.yarn-integrity
+
+# dotenv environment variable files
+
+.env
+.env.development.local
+.env.test.local
+.env.production.local
+.env.local
+
+# parcel-bundler cache (https://parceljs.org/)
+
+.cache
+.parcel-cache
+
+# Next.js build output
+
+.next
+out
+
+# Nuxt.js build / generate output
+
+.nuxt
+dist
+
+# Gatsby files
+
+.cache/
+
+# Comment in the public line in if your project uses Gatsby and not Next.js
+
+# https://nextjs.org/blog/next-9-1#public-directory-support
+
+# public
+
+# vuepress build output
+
+.vuepress/dist
+
+# vuepress v2.x temp and cache directory
+
+.temp
+.cache
+
+# Docusaurus cache and generated files
+
+.docusaurus
+
+# Serverless directories
+
+.serverless/
+
+# FuseBox cache
+
+.fusebox/
+
+# DynamoDB Local files
+
+.dynamodb/
+
+# TernJS port file
+
+.tern-port
+
+# Stores VSCode versions used for testing VSCode extensions
+
+.vscode-test
+
+# yarn v2
+
+.yarn/cache
+.yarn/unplugged
+.yarn/build-state.yml
+.yarn/install-state.gz
+.pnp.\*
+
+# IntelliJ based IDEs
+.idea
+
+# Finder (MacOS) folder config
+.DS_Store
diff --git a/apps/hono/README.md b/apps/hono/README.md
new file mode 100644
index 0000000..feaad51
--- /dev/null
+++ b/apps/hono/README.md
@@ -0,0 +1,7 @@
+# NIRV GRAPH
+
+- api for accessing the nirv graph locally via tinkerpop or on aws neptune
+
+## links
+
+- [github](https://github.com/Ogobar/nirvgraph)
diff --git a/apps/hono/api.sh b/apps/hono/api.sh
new file mode 100755
index 0000000..aa95018
--- /dev/null
+++ b/apps/hono/api.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+docker compose --profile api build
+docker compose run --rm --name nirvgraph-api nirvgraph-api bash
diff --git a/apps/hono/api/README.md b/apps/hono/api/README.md
new file mode 100644
index 0000000..a2d0450
--- /dev/null
+++ b/apps/hono/api/README.md
@@ -0,0 +1,8 @@
+```
+bun install
+bun run dev
+```
+
+```
+open http://localhost:3000
+```
diff --git a/apps/hono/api/bun.lockb b/apps/hono/api/bun.lockb
new file mode 100755
index 0000000000000000000000000000000000000000..1ef2024c5806e0f0e8697c082719ee42511303e2
GIT binary patch
literal 1573
zcmY#Z)GsYA(of3F(@)JSQ%EY!;{sycoc!eMw9K4T-L(9o+{6;yG6OCq1_p+2M>h2J
z*oVAxv6|t(IBx0sAHSlqcKkEx_Z65DpX!#+GL;pm2nd)V6axnu-2mm6!xTXI3=A3h
zdHFC7Cj$daAwzkt>VD0&ULn<Q($97Xy;fp`DI${w`2qxhb}$$M?EyK23y6s|7pC6|
zsK*+pAEu87$R`$n%z&8#qd|JHi~r;Q2eX7&3y4t1$N(`H*=UwW#;3T_#B{irjApL4
z^xtUmM56R?{5GxX4d+j6c+X<5*s#sgwkEkK@Pykd=}BjH-FVy|#&faN_I2py=^0g%
z)29IKg_(=&FP5IvBhI%{mPZ<tu}QqFn`HAZ^pTH?L|Q=RWEM@=IQ1=G{}vXl;o*M3
zKFhc>XrGzZp~Ke|%)K}w44$0z(renWnh5_;QwegIP}5u_vkpKrz!fOXWm8;~te2Tr
zT#}fRqX)}<dLc!rsdfrR1`5TQRjK)DItnHVi8-0+dHHFeGz$a&{zCwW4-R)0hztjm
z=CUa@HnIci#bFA_zZOun4n*n!*#pv709C&Pt}oiiEVk4F=xQ^#eTJy62IX&9e&%3|
zGt@KCGe?vFupH0C7-y_!XrO1v@D6G=j7ANt;?&%-)FM6Cijvf#yu_T~lA_GKbUOt@
zg!LA1>m{J&Q!kVTh78c9hFBa5Dg;X^3sQ?SN=gcft@QPaQqwbwONuJ>@(OaZiuLk~
o()B@QmcA~S(uFuxuOz(+j|RA*KwWUQF3A6eMj)+_Xd8Sa02gWY&;S4c

literal 0
HcmV?d00001

diff --git a/apps/hono/api/bunfig.toml b/apps/hono/api/bunfig.toml
new file mode 100644
index 0000000..c3ffbed
--- /dev/null
+++ b/apps/hono/api/bunfig.toml
@@ -0,0 +1,10 @@
+telemetry = false
+
+[install]
+exact = true
+auto = "auto"
+
+[test]
+preload = ["./src/test/setup.ts"]
+coverage = true
+root = "src"
diff --git a/apps/hono/api/package.json b/apps/hono/api/package.json
new file mode 100644
index 0000000..154854a
--- /dev/null
+++ b/apps/hono/api/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+    "dev": "bun run --hot src/index.ts"
+  },
+  "dependencies": {
+    "hono": "^3.10.1"
+  },
+  "devDependencies": {
+    "bun-types": "^1.0.7"
+  }
+}
diff --git a/apps/hono/api/src/index.ts b/apps/hono/api/src/index.ts
new file mode 100644
index 0000000..c3d6158
--- /dev/null
+++ b/apps/hono/api/src/index.ts
@@ -0,0 +1,7 @@
+import { Hono } from 'hono'
+
+const app = new Hono()
+
+app.get('/', (c) => c.text('Hello Hono!'))
+
+export default app
diff --git a/apps/hono/api/src/test/setup.ts b/apps/hono/api/src/test/setup.ts
new file mode 100644
index 0000000..1e207ab
--- /dev/null
+++ b/apps/hono/api/src/test/setup.ts
@@ -0,0 +1,17 @@
+import * as buntest from "bun:test";
+
+declare global {
+  // bun stuff
+  var describe: typeof buntest.describe;
+  var expect: typeof buntest.expect;
+  var test: typeof buntest.test;
+
+  // not bun stuff
+}
+
+// bun stuff
+globalThis.describe = buntest.describe;
+globalThis.expect = buntest.expect;
+globalThis.test = buntest.test;
+
+// not bun stuff
diff --git a/apps/hono/api/tsconfig.json b/apps/hono/api/tsconfig.json
new file mode 100644
index 0000000..74a140a
--- /dev/null
+++ b/apps/hono/api/tsconfig.json
@@ -0,0 +1,31 @@
+{
+  "include": ["src/**/*"],
+  "exclude": ["node_modules"],
+  "compilerOptions": {
+    "outFile": "types/index",
+    "rootDirs": ["src", "types"],
+    "allowImportingTsExtensions": true,
+    "allowJs": true,
+    "allowSyntheticDefaultImports": true,
+    "alwaysStrict": true,
+    "baseUrl": "./src",
+    "composite": true,
+    "downlevelIteration": true,
+    "forceConsistentCasingInFileNames": true,
+    "jsx": "react-jsx",
+    "jsxImportSource": "hono/jsx",
+    "lib": ["ESNext"],
+    "module": "esnext",
+    "moduleDetection": "force",
+    "moduleResolution": "bundler",
+    "declarationMap": true,
+    "declaration": true,
+    "emitDeclarationOnly": true,
+    "skipLibCheck": true,
+    "strict": true,
+    "target": "esnext",
+    "types": [
+      "bun-types" // add Bun global
+    ]
+  }
+}
diff --git a/apps/hono/docker-compose.yaml b/apps/hono/docker-compose.yaml
new file mode 100644
index 0000000..ef73531
--- /dev/null
+++ b/apps/hono/docker-compose.yaml
@@ -0,0 +1,8 @@
+services:
+  nirvgraph-api:
+    profiles: ["api"]
+    container_name: nirvgraph-api
+    image: oven/bun:1.0.12
+    network_mode: host
+    volumes:
+      - ${PWD}/api:/home/bun/app
diff --git a/apps/hono/tsconfig.json b/apps/hono/tsconfig.json
new file mode 100644
index 0000000..74a140a
--- /dev/null
+++ b/apps/hono/tsconfig.json
@@ -0,0 +1,31 @@
+{
+  "include": ["src/**/*"],
+  "exclude": ["node_modules"],
+  "compilerOptions": {
+    "outFile": "types/index",
+    "rootDirs": ["src", "types"],
+    "allowImportingTsExtensions": true,
+    "allowJs": true,
+    "allowSyntheticDefaultImports": true,
+    "alwaysStrict": true,
+    "baseUrl": "./src",
+    "composite": true,
+    "downlevelIteration": true,
+    "forceConsistentCasingInFileNames": true,
+    "jsx": "react-jsx",
+    "jsxImportSource": "hono/jsx",
+    "lib": ["ESNext"],
+    "module": "esnext",
+    "moduleDetection": "force",
+    "moduleResolution": "bundler",
+    "declarationMap": true,
+    "declaration": true,
+    "emitDeclarationOnly": true,
+    "skipLibCheck": true,
+    "strict": true,
+    "target": "esnext",
+    "types": [
+      "bun-types" // add Bun global
+    ]
+  }
+}