Attributes
Includes Deno configuration
Repository
Current version released
2 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_URL
defaults postgres://localhost:5432/nostringPORT
defaults 9000RELAY_NAME
NIP-11 name fieldRELAY_DESC
NIP-11 description fieldADMIN_PUBKEY
NIP-11 pubkey fieldRELAY_CONTACT
NIP-11 contact fieldMIN_POW
NIP-13 min pow
Usage
deno task start
Use 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())