Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Jan 25, 2024
1 parent 26c96be commit 77d0d5c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# cagliostr

Experimental Nostr Relay written in C++
High performance Nostr Relay written in C++

## Usage

```
$ ./cagliostr
$ ./cagliostr --help
Usage: cagliostr [--help] [--version] [-database DATABASE] [-loglevel LEVEL]
Optional arguments:
-h, --help shows help message and exits
-v, --version prints version information and exits
-database DATABASE connection string [default: "./cagliostr.sqlite"]
-loglevel LEVEL log level [default: "info"]
```

## Requirements
Expand Down
6 changes: 1 addition & 5 deletions main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ static bool matched_filters(const std::vector<filter_t> &filters,
return found;
}

static bool check_event(const event_t ev) {
static bool check_event(const event_t& ev) {
nlohmann::json check = {0, ev.pubkey, ev.created_at,
ev.kind, ev.tags, ev.content};
auto dump = check.dump();
Expand Down Expand Up @@ -477,10 +477,6 @@ static void signal_handler(uv_signal_t *req, int /*signum*/) {
sqlite3_close_v2(conn);
}

using commandtype = std::function<void(
const std::string &, std::vector<std::string>::const_iterator,
std::vector<std::string>::const_iterator)>;

static std::string env(const char *name, const char *defvalue) {
const char *value = getenv(name);
if (value == nullptr) {
Expand Down

0 comments on commit 77d0d5c

Please sign in to comment.