Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Error: Returning from a request handler without responding or attaching an abort handler is forbidden! #13

Open
rtritto opened this issue Oct 8, 2024 · 0 comments

Comments

@rtritto
Copy link

rtritto commented Oct 8, 2024

Repro

  • bun add elysia @elysiajs/node@github:rtritto/node-adapter#develop tsx OR yarn add elysia @elysiajs/node@github:rtritto/node-adapter#develop tsx
  • Create server.ts
    import { Elysia } from 'elysia'
    import { node } from '@elysiajs/node'
    
    const port = +(process.env.PORT || 3000)
    const URL = '<URL>'
    
    const app = new Elysia()
    app
      .get('/', async () => {
        await fetch(URL)
        return 'OK'
      })
      .use(node(port, (socket) => {
        console.log(`Node server running at http://localhost:${port}`)
      }))
  • bun server.ts OR yarn tsx server.ts
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant