Skip to content

Commit be9cea1

Browse files
reactjs hello world
1 parent c428911 commit be9cea1

File tree

6 files changed

+74
-0
lines changed

6 files changed

+74
-0
lines changed

hono-app/.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules
2+
dist
3+
.wrangler
4+
.dev.vars
5+
6+
# Change them to your taste:
7+
package-lock.json
8+
yarn.lock
9+
pnpm-lock.yaml
10+
bun.lockb

hono-app/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
```
2+
npm install
3+
npm run dev
4+
```
5+
6+
```
7+
npm run deploy
8+
```

hono-app/package.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"scripts": {
3+
"dev": "wrangler dev src/index.ts",
4+
"deploy": "wrangler deploy --minify src/index.ts"
5+
},
6+
"dependencies": {
7+
"hono": "^4.1.2"
8+
},
9+
"devDependencies": {
10+
"@cloudflare/workers-types": "^4.20240208.0",
11+
"wrangler": "^3.32.0"
12+
}
13+
}

hono-app/src/index.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Hono } from 'hono'
2+
3+
const app = new Hono()
4+
5+
app.get('/', (c) => {
6+
return c.text('Hello Hono!')
7+
})
8+
9+
export default app

hono-app/tsconfig.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ESNext",
4+
"module": "ESNext",
5+
"moduleResolution": "Bundler",
6+
"strict": true,
7+
"lib": [
8+
"ESNext"
9+
],
10+
"types": [
11+
"@cloudflare/workers-types"
12+
],
13+
"jsx": "react-jsx",
14+
"jsxImportSource": "hono/jsx"
15+
},
16+
}

hono-app/wrangler.toml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name = "hono-app"
2+
compatibility_date = "2023-12-01"
3+
4+
# [vars]
5+
# MY_VAR = "my-variable"
6+
7+
# [[kv_namespaces]]
8+
# binding = "MY_KV_NAMESPACE"
9+
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
10+
11+
# [[r2_buckets]]
12+
# binding = "MY_BUCKET"
13+
# bucket_name = "my-bucket"
14+
15+
# [[d1_databases]]
16+
# binding = "DB"
17+
# database_name = "my-database"
18+
# database_id = ""

0 commit comments

Comments
 (0)