pinax-network / substreams-sink-websockets

Substreams Sink Websockets
https://substreams-sink-websockets-production.up.railway.app
MIT License
2 stars 1 forks source link

Refactor HTTP fetch to use `hono` #26

Closed DenisCarriere closed 1 year ago

DenisCarriere commented 1 year ago

Since a lot of our API's are being built with Hono

We should be able to integrate Hono + Bun WebSockets

import { Hono } from 'hono'

const app = new Hono()
app.get('/', (c) => c.text('Hello Bun!'))

export default {
  port: 3000,
  fetch: app.fetch,
  websocket: {
    open: websocket.open,
    close: websocket.close,
    message: websocket.message,
  },
}
DenisCarriere commented 1 year ago

not doing, we will stick with Native bun