mirror of
https://github.com/Cameri/nostream.git
synced 2025-03-17 13:21:45 +01:00
chore: rename project to nostream
This commit is contained in:
parent
e0471cac7e
commit
cf44523188
@ -14,10 +14,10 @@
|
||||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
||||
}],
|
||||
["semantic-release-telegram", {
|
||||
"name": "nostr-ts-relay",
|
||||
"name": "nostream",
|
||||
"chats": [ -1001670974037 ],
|
||||
"templates": {
|
||||
"success" : "A new version of <a href='{repository_url}'>{name}</a> has been released. Current version is <b>{version}</b>"
|
||||
"success" : "A {release_type} version of <a href='{repository_url}'>{name}</a> has been released. Current version is <b>{version}</b>\n{release_notes}"
|
||||
}
|
||||
}]
|
||||
]
|
||||
|
@ -23,7 +23,7 @@ The following environment variables can be set:
|
||||
|
||||
# Settings
|
||||
|
||||
Running `nostr-ts-relay` for the first time creates the settings file in `<project_root>/.nostr/settings.json`. If the file is not created and an error is thrown ensure that the `<project_root>/.nostr` folder exists. The configuration directory can be changed by setting the `NOSTR_CONFIG_DIR` environment variable.
|
||||
Running `nostream` for the first time creates the settings file in `<project_root>/.nostr/settings.json`. If the file is not created and an error is thrown ensure that the `<project_root>/.nostr` folder exists. The configuration directory can be changed by setting the `NOSTR_CONFIG_DIR` environment variable.
|
||||
|
||||
| Name | Description |
|
||||
|---------------------------------------------|-------------------------------------------------------------------------------|
|
||||
|
@ -13,8 +13,8 @@ RUN npm run build
|
||||
FROM node:18-alpine3.16
|
||||
|
||||
LABEL org.opencontainers.image.title="Nostr Typescript Relay"
|
||||
LABEL org.opencontainers.image.source=https://github.com/Cameri/nostr-ts-relay
|
||||
LABEL org.opencontainers.image.description="nostr-ts-relay"
|
||||
LABEL org.opencontainers.image.source=https://github.com/Cameri/nostream
|
||||
LABEL org.opencontainers.image.description="nostream"
|
||||
LABEL org.opencontainers.image.authors="Ricardo Arturo Cabral Mejía"
|
||||
LABEL org.opencontainers.image.licenses=MIT
|
||||
|
||||
|
@ -39,8 +39,8 @@ RUN npm run build
|
||||
FROM node:18-alpine3.16
|
||||
|
||||
LABEL org.opencontainers.image.title="Nostr Typescript Relay"
|
||||
LABEL org.opencontainers.image.source=https://github.com/Cameri/nostr-ts-relay
|
||||
LABEL org.opencontainers.image.description="nostr-ts-relay"
|
||||
LABEL org.opencontainers.image.source=https://github.com/Cameri/nostream
|
||||
LABEL org.opencontainers.image.description="nostream"
|
||||
LABEL org.opencontainers.image.authors="Ricardo Arturo Cabral Mejía"
|
||||
LABEL org.opencontainers.image.licenses=MIT
|
||||
|
||||
|
72
README.md
72
README.md
@ -1,34 +1,34 @@
|
||||
# [nostr-ts-relay](https://github.com/Cameri/nostr-ts-relay)
|
||||
# [nostream](https://github.com/Cameri/nostream)
|
||||
|
||||
<p align="center">
|
||||
<img alt="nostr-ts-relay logo" height="256px" width="256px" src="https://user-images.githubusercontent.com/378886/198158439-86e0345a-adc8-4efe-b0ab-04ff3f74c1b2.jpg" />
|
||||
<img alt="nostream logo" height="256px" width="256px" src="https://user-images.githubusercontent.com/378886/198158439-86e0345a-adc8-4efe-b0ab-04ff3f74c1b2.jpg" />
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/Cameri/nostr-ts-relay/releases">
|
||||
<img alt="GitHub release" src="https://img.shields.io/github/v/release/Cameri/nostr-ts-relay">
|
||||
<a href="https://github.com/Cameri/nostream/releases">
|
||||
<img alt="GitHub release" src="https://img.shields.io/github/v/release/Cameri/nostream">
|
||||
</a>
|
||||
<a href="https://github.com/Cameri/nostr-ts-relay/issues">
|
||||
<img alt="GitHub issues" src="https://img.shields.io/github/issues/Cameri/nostr-ts-relay?style=plastic" />
|
||||
<a href="https://github.com/Cameri/nostream/issues">
|
||||
<img alt="GitHub issues" src="https://img.shields.io/github/issues/Cameri/nostream?style=plastic" />
|
||||
</a>
|
||||
<a href="https://github.com/Cameri/nostr-ts-relay/stargazers">
|
||||
<img alt="GitHub stars" src="https://img.shields.io/github/stars/Cameri/nostr-ts-relay" />
|
||||
<a href="https://github.com/Cameri/nostream/stargazers">
|
||||
<img alt="GitHub stars" src="https://img.shields.io/github/stars/Cameri/nostream" />
|
||||
</a>
|
||||
<img alt="GitHub top language" src="https://img.shields.io/github/languages/top/Cameri/nostr-ts-relay">
|
||||
<a href="https://github.com/Cameri/nostr-ts-relay/network">
|
||||
<img alt="GitHub forks" src="https://img.shields.io/github/forks/Cameri/nostr-ts-relay" />
|
||||
<img alt="GitHub top language" src="https://img.shields.io/github/languages/top/Cameri/nostream">
|
||||
<a href="https://github.com/Cameri/nostream/network">
|
||||
<img alt="GitHub forks" src="https://img.shields.io/github/forks/Cameri/nostream" />
|
||||
</a>
|
||||
<a href="https://github.com/Cameri/nostr-ts-relay/blob/main/LICENSE">
|
||||
<img alt="GitHub license" src="https://img.shields.io/github/license/Cameri/nostr-ts-relay" />
|
||||
<a href="https://github.com/Cameri/nostream/blob/main/LICENSE">
|
||||
<img alt="GitHub license" src="https://img.shields.io/github/license/Cameri/nostream" />
|
||||
</a>
|
||||
<a href='https://coveralls.io/github/Cameri/nostr-ts-relay?branch=main'>
|
||||
<img alt='Coverage Status' src='https://coveralls.io/repos/github/Cameri/nostr-ts-relay/badge.svg?branch=main' />
|
||||
<a href='https://coveralls.io/github/Cameri/nostream?branch=main'>
|
||||
<img alt='Coverage Status' src='https://coveralls.io/repos/github/Cameri/nostream/badge.svg?branch=main' />
|
||||
</a>
|
||||
<a href='https://sonarcloud.io/project/overview?id=Cameri_nostr-ts-relay'>
|
||||
<img alt='Sonarcloud quality gate' src='https://sonarcloud.io/api/project_badges/measure?project=Cameri_nostr-ts-relay&metric=alert_status' />
|
||||
<a href='https://sonarcloud.io/project/overview?id=Cameri_nostream'>
|
||||
<img alt='Sonarcloud quality gate' src='https://sonarcloud.io/api/project_badges/measure?project=Cameri_nostream&metric=alert_status' />
|
||||
</a>
|
||||
<a href='https://github.com/Cameri/nostr-ts-relay/actions'>
|
||||
<img alt='Build status' src='https://github.com/Cameri/nostr-ts-relay/actions/workflows/checks.yml/badge.svg?branch=main&event=push' />
|
||||
<a href='https://github.com/Cameri/nostream/actions'>
|
||||
<img alt='Build status' src='https://github.com/Cameri/nostream/actions/workflows/checks.yml/badge.svg?branch=main&event=push' />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
@ -37,7 +37,7 @@ Typescript.
|
||||
|
||||
This implementation is production-ready. See below for supported features.
|
||||
|
||||
The project master repository is available on [GitHub](https://github.com/Cameri/nostr-ts-relay).
|
||||
The project master repository is available on [GitHub](https://github.com/Cameri/nostream).
|
||||
|
||||
[](https://railway.app/new/template/BWx8DY?referralCode=qVdmfO)
|
||||
|
||||
@ -85,8 +85,8 @@ You may have to uninstall Docker if you installed it using a different guide.
|
||||
|
||||
Clone repository and enter directory:
|
||||
```
|
||||
git clone git@github.com:Cameri/nostr-ts-relay.git
|
||||
cd nostr-ts-relay
|
||||
git clone git@github.com:Cameri/nostream.git
|
||||
cd nostream
|
||||
```
|
||||
|
||||
Start:
|
||||
@ -115,10 +115,10 @@ By default this server will run continuously until you stop it with Ctrl+C or un
|
||||
You can [install as a systemd service](https://www.swissrouting.com/nostr.html#installing-as-a-service) if you want the server to run again automatically whenever the system is restarted. For example:
|
||||
|
||||
```
|
||||
$ nano /etc/systemd/system/nostr-ts-relay.service
|
||||
$ nano /etc/systemd/system/nostream.service
|
||||
|
||||
# Note: replace "User=..." with your username, and
|
||||
# "/home/nostr/nostr-ts-relay" with the directory where you cloned the repo.
|
||||
# "/home/nostr/nostream" with the directory where you cloned the repo.
|
||||
|
||||
[Unit]
|
||||
Description=Nostr TS Relay
|
||||
@ -130,9 +130,9 @@ You can [install as a systemd service](https://www.swissrouting.com/nostr.html#i
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
User=nostr
|
||||
WorkingDirectory=/home/nostr/nostr-ts-relay
|
||||
ExecStart=/home/nostr/nostr-ts-relay/scripts/start
|
||||
ExecStop=/home/nostr/nostr-ts-relay/scripts/stop
|
||||
WorkingDirectory=/home/nostr/nostream
|
||||
ExecStart=/home/nostr/nostream/scripts/start
|
||||
ExecStop=/home/nostr/nostream/scripts/stop
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@ -141,14 +141,14 @@ You can [install as a systemd service](https://www.swissrouting.com/nostr.html#i
|
||||
And then:
|
||||
|
||||
```
|
||||
systemctl enable nostr-ts-relay
|
||||
systemctl start nostr-ts-relay
|
||||
systemctl enable nostream
|
||||
systemctl start nostream
|
||||
```
|
||||
|
||||
The logs can be viewed with:
|
||||
|
||||
```
|
||||
journalctl -u nostr-ts-relay
|
||||
journalctl -u nostream
|
||||
```
|
||||
|
||||
## Quick Start (Standalone)
|
||||
@ -186,8 +186,8 @@ Start Redis and use `redis-cli` to set the default password and verify:
|
||||
|
||||
Clone repository and enter directory:
|
||||
```
|
||||
git clone git@github.com:Cameri/nostr-ts-relay.git
|
||||
cd nostr-ts-relay
|
||||
git clone git@github.com:Cameri/nostream.git
|
||||
cd nostream
|
||||
```
|
||||
|
||||
Install dependencies:
|
||||
@ -232,7 +232,7 @@ To clean up the build, coverage and test reports run:
|
||||
|
||||
Open a terminal and change to the project's directory:
|
||||
```
|
||||
cd /path/to/nostr-ts-relay
|
||||
cd /path/to/nostream
|
||||
```
|
||||
|
||||
Run unit tests with:
|
||||
@ -267,7 +267,7 @@ To see the unit tests coverage report open `.coverage/unit/lcov-report/index.htm
|
||||
|
||||
Open a terminal and change to the project's directory:
|
||||
```
|
||||
cd /path/to/nostr-ts-relay
|
||||
cd /path/to/nostream
|
||||
```
|
||||
|
||||
Run integration tests with:
|
||||
@ -286,7 +286,7 @@ And to get integration test coverage run:
|
||||
|
||||
Open a terminal and change to the project's directory:
|
||||
```
|
||||
cd /path/to/nostr-ts-relay
|
||||
cd /path/to/nostream
|
||||
```
|
||||
|
||||
Set the following environment variables:
|
||||
@ -328,7 +328,7 @@ To see the integration test coverage report open `.coverage/integration/lcov-rep
|
||||
|
||||
You can change the default folder by setting the `NOSTR_CONFIG_DIR` environment variable to a different path.
|
||||
|
||||
Run nostr-ts-relay using one of the quick-start guides at least once and `~/.nostr/settings.json` will be created.
|
||||
Run nostream using one of the quick-start guides at least once and `~/.nostr/settings.json` will be created.
|
||||
Any changes made to the settings file will be read on the next start.
|
||||
|
||||
A sample settings file is included at the project root under the name `settings.sample.json`. Feel free to copy it to `~/.nostr/settings.json`
|
||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "nostr-ts-relay",
|
||||
"name": "nostream",
|
||||
"version": "1.12.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "nostr-ts-relay",
|
||||
"name": "nostream",
|
||||
"version": "1.12.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
10
package.json
10
package.json
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "nostr-ts-relay",
|
||||
"name": "nostream",
|
||||
"version": "1.12.0",
|
||||
"description": "A Nostr relay written in Typescript.",
|
||||
"supportedNips": [
|
||||
@ -33,7 +33,7 @@
|
||||
"test:unit": "mocha 'test/**/*.spec.ts'",
|
||||
"test:unit:watch": "npm run test:unit -- --min --watch --watch-files src/**/*,test/**/*",
|
||||
"cover:unit": "nyc --report-dir .coverage/unit npm run test:unit",
|
||||
"docker:build": "docker build -t nostr-ts-relay .",
|
||||
"docker:build": "docker build -t nostream .",
|
||||
"pretest:integration": "mkdir -p .test-reports/integration",
|
||||
"test:integration": "cucumber-js",
|
||||
"cover:integration": "nyc --report-dir .coverage/integration npm run test:integration -- -p cover",
|
||||
@ -51,7 +51,7 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Cameri/nostr-ts-relay.git"
|
||||
"url": "git+https://github.com/Cameri/nostream.git"
|
||||
},
|
||||
"keywords": [
|
||||
"nostr",
|
||||
@ -61,9 +61,9 @@
|
||||
"author": "Ricardo Arturo Cabral Mejía (npub1qqqqqqyz0la2jjl752yv8h7wgs3v098mh9nztd4nr6gynaef6uqqt0n47m)",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/Cameri/nostr-ts-relay/issues"
|
||||
"url": "https://github.com/Cameri/nostream/issues"
|
||||
},
|
||||
"homepage": "https://github.com/Cameri/nostr-ts-relay#readme",
|
||||
"homepage": "https://github.com/Cameri/nostream#readme",
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "17.2.0",
|
||||
"@commitlint/config-conventional": "17.2.0",
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
PROJECT_ROOT="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))/.."
|
||||
cat $PROJECT_ROOT/.nostr/tor/data/nostr-ts-relay/hostname
|
||||
cat $PROJECT_ROOT/.nostr/tor/data/nostream/hostname
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"info": {
|
||||
"relay_url": "wss://nostr-ts-relay.your-domain.com",
|
||||
"name": "nostr-ts-relay.your-domain.com",
|
||||
"relay_url": "wss://nostream.your-domain.com",
|
||||
"name": "nostream.your-domain.com",
|
||||
"description": "A nostr relay written in Typescript.",
|
||||
"pubkey": "replace-with-your-pubkey",
|
||||
"contact": "operator@your-domain.com"
|
||||
|
@ -36,7 +36,7 @@ services:
|
||||
migrations-test:
|
||||
condition: service_completed_successfully
|
||||
networks:
|
||||
- nostr-ts-relay-test
|
||||
- nostream-test
|
||||
links:
|
||||
- db-test
|
||||
db-test:
|
||||
@ -46,7 +46,7 @@ services:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: nostr_ts_relay_test
|
||||
networks:
|
||||
- nostr-ts-relay-test
|
||||
- nostream-test
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
timeout: 5s
|
||||
@ -56,7 +56,7 @@ services:
|
||||
image: redis:7.0.5-alpine3.16
|
||||
command: redis-server --save 20 1 --loglevel warning --requirepass nostr_ts_relay_test
|
||||
networks:
|
||||
- nostr-ts-relay-test
|
||||
- nostream-test
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: [ "CMD", "redis-cli", "ping", "|", "grep", "PONG" ]
|
||||
@ -82,9 +82,9 @@ services:
|
||||
db-test:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- nostr-ts-relay-test
|
||||
- nostream-test
|
||||
links:
|
||||
- db-test
|
||||
|
||||
networks:
|
||||
nostr-ts-relay-test:
|
||||
nostream-test:
|
||||
|
@ -21,8 +21,8 @@ Feature: NIP-01
|
||||
Scenario: Alice posts a recommend_server event
|
||||
Given someone called Alice
|
||||
And Alice subscribes to author Alice
|
||||
When Alice sends a recommend_server event with content "https://nostr-ts-relay.wlvs.space"
|
||||
Then Alice receives a recommend_server event from Alice with content "https://nostr-ts-relay.wlvs.space"
|
||||
When Alice sends a recommend_server event with content "https://nostr-relay.wlvs.space"
|
||||
Then Alice receives a recommend_server event from Alice with content "https://nostr-relay.wlvs.space"
|
||||
|
||||
Scenario: Alice can't post a text_note event with an invalid signature
|
||||
Given someone called Alice
|
||||
|
Loading…
x
Reference in New Issue
Block a user