create new hono app

This commit is contained in:
Michi 2025-09-07 20:15:08 +02:00
parent 8e2f1805c2
commit b3dad47df1
7 changed files with 1687 additions and 0 deletions

33
themepark-assistant/.gitignore vendored Normal file
View file

@ -0,0 +1,33 @@
# prod
dist/
# dev
.yarn/
!.yarn/releases
.vscode/*
!.vscode/launch.json
!.vscode/*.code-snippets
.idea/workspace.xml
.idea/usage.statistics.xml
.idea/shelf
# deps
node_modules/
.wrangler
# env
.env
.env.production
.dev.vars
# logs
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
# misc
.DS_Store

View file

@ -0,0 +1,21 @@
```txt
npm install
npm run dev
```
```txt
npm run deploy
```
[For generating/synchronizing types based on your Worker configuration run](https://developers.cloudflare.com/workers/wrangler/commands/#types):
```txt
npm run cf-typegen
```
Pass the `CloudflareBindings` as generics when instantiation `Hono`:
```ts
// src/index.ts
const app = new Hono<{ Bindings: CloudflareBindings }>()
```

1557
themepark-assistant/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,15 @@
{
"name": "themepark-assistant",
"type": "module",
"scripts": {
"dev": "wrangler dev",
"deploy": "wrangler deploy --minify",
"cf-typegen": "wrangler types --env-interface CloudflareBindings"
},
"dependencies": {
"hono": "^4.9.6"
},
"devDependencies": {
"wrangler": "^4.4.0"
}
}

View file

@ -0,0 +1,9 @@
import { Hono } from 'hono'
const app = new Hono()
app.get('/', (c) => {
return c.text('Hello Hono!')
})
export default app

View file

@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"strict": true,
"skipLibCheck": true,
"lib": [
"ESNext"
],
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx"
},
}

View file

@ -0,0 +1,38 @@
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "themepark-assistant",
"main": "src/index.ts",
"compatibility_date": "2025-09-07"
// "compatibility_flags": [
// "nodejs_compat"
// ],
// "vars": {
// "MY_VAR": "my-variable"
// },
// "kv_namespaces": [
// {
// "binding": "MY_KV_NAMESPACE",
// "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
// }
// ],
// "r2_buckets": [
// {
// "binding": "MY_BUCKET",
// "bucket_name": "my-bucket"
// }
// ],
// "d1_databases": [
// {
// "binding": "MY_DB",
// "database_name": "my-database",
// "database_id": ""
// }
// ],
// "ai": {
// "binding": "AI"
// },
// "observability": {
// "enabled": true,
// "head_sampling_rate": 1
// }
}