JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q47749F
  • License MIT

in-memory only nostr relay

Package Exports

  • nostrmini
  • nostrmini/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nostrmini) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

nostrmini

Very small in-memory nostr relay server that uses a dequeue store for events

Written for tests but could also be used as a base for more complex memory routing, for example.

# run from the cli

yarn install
yarn start:dev

Or use as a lib

Add to project:

yarn add nostrmini

Use in tests with a dynamic port:

import NostrMini from 'nostrmini'
const srv = new NostrMini()
srv.listen(0)
const port = srv.address().port
const url = `ws://127.0.0.1:${port}`

// be sure to close all your connections too
afterAll(()=>{
  srv.close()
})