A web server that displays the 10 most recently updated Nostr profiles, with the ability to view individual profile details.
npm install
The application can be configured using environment variables:
PORT
: Server port (default: 3000)STORAGE_TYPE
: Storage backend to use, either ‘file’ or ‘mongodb’ (default: ‘file’)MONGO_URL
: MongoDB connection URL (default: ‘mongodb://localhost:27017’)MONGO_DB
: MongoDB database name (default: ‘nostr’)MONGO_COLLECTION
: MongoDB collection name (default: ‘beacon’)Start the server:
node server.js
Then visit http://localhost:3000
in your browser to see the list of profiles.
GET /api/profiles
- Get a list of recent profiles (JSON)GET /api/profile/:pubkey
- Get a specific profile by pubkey (JSON)When using file storage (default), profiles are stored as JSON files in the data/
directory.
When using MongoDB storage, make sure to set the proper environment variables and ensure MongoDB is running.
This application no longer subscribes to the Nostr firehose. To add profiles, you can:
MIT