Attributes
Includes Deno configuration
Repository
Current version released
3 years ago
Nostring
WIP
A simple pure Nostr relay written in Deno.
Features
- Can deployed on Deno Deploy
- Internal forward events by BroadcastChannel(Only on Deno Deploy)
- Multi data store provider(WIP)
- PostgreSQL
- Programmable
- Supported NIPs
- 01 02 04 09 11 12 15 16 20 26 28 33 40 56
Requirements
- Deno ^1.30.0
- PostgreSQL 15 (Other database support is WIP)
Configure environments
All variables are optional.
DB_URLdefaults postgres://localhost:5432/nostringPORTdefaults 9000RELAY_NAMENIP-11 name fieldRELAY_DESCNIP-11 description fieldADMIN_PUBKEYNIP-11 pubkey fieldRELAY_CONTACTNIP-11 contact fieldMIN_POWNIP-13 min pow
Usage
deno task startUse as a library
// Your init code...
import { Application } from "https://deno.land/x/nostring/mod.ts"
const app = new Application({
onConnect: (ws, req) => {},
onEvent: (ev) => {},
onAuth: (ev) => {},
});
// Serve
import { serve } from "https://deno.land/std/http/server.ts"
serve(app.getHandler())