nostrmini
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

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()
})

/nostrmini/

    Package Sidebar

    Install

    npm i nostrmini

    Weekly Downloads

    92

    Version

    1.2.1

    License

    MIT

    Unpacked Size

    11.1 kB

    Total Files

    13

    Last publish

    Collaborators

    • earonesty