Skip to content

Commit

Permalink
Merge pull request #34 from hollow-leaf/feat/serverless
Browse files Browse the repository at this point in the history
feat(serverless): template
  • Loading branch information
kidneyweakx authored Feb 1, 2024
2 parents 3ed85be + fd2f4a1 commit 665c8b3
Show file tree
Hide file tree
Showing 7 changed files with 544 additions and 16 deletions.
10 changes: 10 additions & 0 deletions apps/serverless/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
dist
.wrangler
.dev.vars

# Change them to your taste:
wrangler.toml
package-lock.json
yarn.lock
pnpm-lock.yaml
8 changes: 8 additions & 0 deletions apps/serverless/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
```
npm install
npm run dev
```

```
npm run deploy
```
13 changes: 13 additions & 0 deletions apps/serverless/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"scripts": {
"dev": "wrangler dev src/index.ts",
"deploy": "wrangler deploy --minify src/index.ts"
},
"dependencies": {
"hono": "^3.12.8"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240129.0",
"wrangler": "^3.25.0"
}
}
9 changes: 9 additions & 0 deletions apps/serverless/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Hono } from 'hono'

const app = new Hono()

app.get('/', (c) => {
return c.text('Hello Hono!')
})

export default app
16 changes: 16 additions & 0 deletions apps/serverless/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"strict": true,
"lib": [
"ESNext"
],
"types": [
"@cloudflare/workers-types"
],
"jsx": "react-jsx",
"jsxImportSource": "hono/jsx"
},
}
Loading

0 comments on commit 665c8b3

Please sign in to comment.