feat: initial commit

This commit is contained in:
2024-05-14 21:49:01 -04:00
commit f78ad2d2dd
6 changed files with 78 additions and 0 deletions

10
.gitignore vendored Normal file
View File

@@ -0,0 +1,10 @@
node_modules
dist
.wrangler
.dev.vars
# Change them to your taste:
package-lock.json
yarn.lock
pnpm-lock.yaml
bun.lockb

8
README.md Normal file
View File

@@ -0,0 +1,8 @@
```
npm install
npm run dev
```
```
npm run deploy
```

13
package.json Normal file
View File

@@ -0,0 +1,13 @@
{
"scripts": {
"dev": "wrangler dev src/index.ts",
"deploy": "wrangler deploy --minify src/index.ts"
},
"dependencies": {
"hono": "^4.3.6"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240403.0",
"wrangler": "^3.47.0"
}
}

9
src/index.ts Normal file
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

17
tsconfig.json Normal file
View File

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

21
wrangler.toml Normal file
View File

@@ -0,0 +1,21 @@
name = "aniplay-api"
compatibility_date = "2023-12-01"
# [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 = "DB"
# database_name = "my-database"
# database_id = ""
# [ai]
# binding = "AI"