mirror of
https://github.com/michivonah/themepark-assistant.git
synced 2025-12-22 22:16:29 +01:00
create new hono app
This commit is contained in:
parent
8e2f1805c2
commit
b3dad47df1
7 changed files with 1687 additions and 0 deletions
33
themepark-assistant/.gitignore
vendored
Normal file
33
themepark-assistant/.gitignore
vendored
Normal 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
|
||||
21
themepark-assistant/README.md
Normal file
21
themepark-assistant/README.md
Normal 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
1557
themepark-assistant/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
15
themepark-assistant/package.json
Normal file
15
themepark-assistant/package.json
Normal 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"
|
||||
}
|
||||
}
|
||||
9
themepark-assistant/src/index.ts
Normal file
9
themepark-assistant/src/index.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { Hono } from 'hono'
|
||||
|
||||
const app = new Hono()
|
||||
|
||||
app.get('/', (c) => {
|
||||
return c.text('Hello Hono!')
|
||||
})
|
||||
|
||||
export default app
|
||||
14
themepark-assistant/tsconfig.json
Normal file
14
themepark-assistant/tsconfig.json
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"lib": [
|
||||
"ESNext"
|
||||
],
|
||||
"jsx": "react-jsx",
|
||||
"jsxImportSource": "hono/jsx"
|
||||
},
|
||||
}
|
||||
38
themepark-assistant/wrangler.jsonc
Normal file
38
themepark-assistant/wrangler.jsonc
Normal 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
|
||||
// }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue