Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
xizeyoupan committed Sep 25, 2023
1 parent 6bf840b commit 1708106
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
17 changes: 15 additions & 2 deletions api/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import app from "../app.js"
// import app from "../app.js"

async function writeReadableStreamToWritable(stream, writable) {
let reader = stream.getReader()
Expand Down Expand Up @@ -95,4 +95,17 @@ const getRequestListener = (fetchCallback) => {
}
}

export default getRequestListener(app.fetch)
// export default getRequestListener(app.fetch)


import { Hono } from 'hono'
import { handle } from 'hono/vercel'

export const config = {
runtime: 'edge',
}

const app = new Hono().basePath('/api')
app.get('/', (c) => c.json({ message: 'Hello Hono!' }))

export default handle(app)
2 changes: 1 addition & 1 deletion node.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { handler } from './src/template.js'
import { handler } from './src/template'
import config from './src/config.js'
import api from './src/service/api.js'
import { Hono } from 'hono'
Expand Down

1 comment on commit 1708106

@vercel
Copy link

@vercel vercel bot commented on 1708106 Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.