Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Latest commit

 

History

History
36 lines (21 loc) · 1.27 KB

README.md

File metadata and controls

36 lines (21 loc) · 1.27 KB

Important

This repo has been deprecated and rolled into https://github.com/satellite-earth/core/tree/master/src/nostr-relay

A Very Simple Nostr Relay Implementation

I started building this while developing the Satellite web client.

It's very simple. NodeJS + MongoDB.

I haven't tried to run this relay in production (yet) but it has been quite useful for local development as a way to understand exactly what's happening in the interaction between the relay and the client.

Getting Started

You'll need to have Node installed obviously.

You'll also need to install monogodb to run a local database.

https://www.mongodb.com/docs/manual/installation/

Once that's up and running, the last bit of setup is to create a .env file at the root of the project to hold your local environmental variables. It should look something like this:

DB_CONNECTION_STRING=mongodb://localhost/<my_database_name>
EVENT_MAX_SIZE=524288
HEARTBEAT_INTERVAL=60000
PORT=3030

Just replace <my_database_name> with the appropriate value.

Then npm install and npm start.

Now that your relay is started, you can add ws://localhost:3030 to the relay list of your client running on the same machine.

. . . full documentation coming soon