Open lautiamkok opened 1 year ago
Is it possible to support [unjs/h3](https://github.com/unjs/h3)? I tried the following code with the custom setup:
[unjs/h3](https://github.com/unjs/h3)
// ./app.ts import { createServer } from 'node:http' import { createApp, eventHandler, toNodeListener } from 'h3' const app = createApp() app.use( '/', eventHandler(() => 'Hello world!') ) const listener = createServer(toNodeListener(app)) if (import.meta.env.PROD) { listener.listen(process.env.PORT || 3000) console.log(`🚀 Server ready at *:3000`) } export const viteNodeApp = listener
Error:
file:///...e/vite.config.ts.timestamp-1678018252429.mjs:16 app(res, res); ^ TypeError: app is not a function
Any ideas?
not very familiar with h3, but try expose the app instead the listener. export const viteNodeApp = app
app
export const viteNodeApp = app
Is it possible to support
[unjs/h3](https://github.com/unjs/h3)
? I tried the following code with the custom setup:Error:
Any ideas?