commit f78ad2d2ddeab83410d495ededb021d1db281f1d Author: Rushil Perera Date: Tue May 14 21:49:01 2024 -0400 feat: initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c0be6e --- /dev/null +++ b/.gitignore @@ -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 \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..cc58e96 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +``` +npm install +npm run dev +``` + +``` +npm run deploy +``` diff --git a/package.json b/package.json new file mode 100644 index 0000000..17fcf2a --- /dev/null +++ b/package.json @@ -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" + } +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..3191383 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,9 @@ +import { Hono } from 'hono' + +const app = new Hono() + +app.get('/', (c) => { + return c.text('Hello Hono!') +}) + +export default app diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..c00e6fb --- /dev/null +++ b/tsconfig.json @@ -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" + }, +} \ No newline at end of file diff --git a/wrangler.toml b/wrangler.toml new file mode 100644 index 0000000..eaae390 --- /dev/null +++ b/wrangler.toml @@ -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" \ No newline at end of file