Open gaboe opened 1 week ago
I have added whole minimal reproducible repo https://github.com/gaboe/nostr-api
I have been strugling wih this for few hours, i would appreciate any help.
Did you tried to use useWebSocketImplementation
from https://github.com/nbd-wtf/nostr-tools?tab=readme-ov-file#interacting-with-multiple-relays?
I mean, like this config:
import { useWebSocketImplementation } from 'nostr-tools/pool'
useWebSocketImplementation(require('ws'))
I think you can try this too:
Object.assign(global, { WebSocket: require('ws') });
Description
When running our application in a Docker container, we're experiencing connection timeouts when trying to connect to Nostr relays. The same code works fine on macOS bun, but fails in bun the Docker environment.
Also i have tried using nodejs with polyfill hack, but it didn't work either https://github.com/nbd-wtf/nostr-tools/pull/347
Is this package supossed to work on server?