Timeout after commenting out config
variable in Vercel environment
#2641
-
I'm using the Vercel template of Hono: import { Hono } from 'hono';
import { handle } from 'hono/vercel';
// export const config = {
// runtime: 'edge',
// };
const app = new Hono().basePath('/api');
app.get('/', (context) => {
return context.json({ message: 'Hello Hono!' });
});
export default handle(app); I need to use full Node.js apis so I don't want to deploy in edge runtime. But now I get
when I call the api. How to fix this? By the way, I need to use Playwright in my project. Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
NicoPlyley
May 11, 2024
Replies: 1 comment 3 replies
-
I think this is what your looking for https://hono.dev/getting-started/vercel#node-js import { Hono } from 'hono'
import { handle } from '@hono/node-server/vercel'
import type { PageConfig } from 'next'
export const config: PageConfig = {
api: {
bodyParser: false,
},
}
const app = new Hono().basePath('/api')
app.get('/hello', (c) => {
return c.json({
message: 'Hello from Hono!',
})
})
export default handle(app) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have never tried to use playwright inside a route only outside for testing. I don't know the compatibility with Vercel only used it for SvelteKit. You might have more luck in the Vercel discord with this question. I couldn't find anything in their docs.