Files
parrhesia/config/test.exs
Steffen Beyer 1199369dd9 test: NAME:
nak - the nostr army knife command-line tool

USAGE:
   nak [global options] [command [command options]]

VERSION:
   0.17.3

COMMANDS:
   event    generates an encoded event and either prints it or sends it to a set of relays
   req      generates encoded REQ messages and optionally use them to talk to relays
   filter   applies an event filter to an event to see if it matches.
   fetch    fetches events related to the given nip19 or nip05 code from the included relay hints or the author's outbox relays.
   count    generates encoded COUNT messages and optionally use them to talk to relays
   decode   decodes nip19, nip21, nip05 or hex entities
   encode   encodes notes and other stuff to nip19 entities
   key      operations on secret keys: generate, derive, encrypt, decrypt
   verify   checks the hash and signature of an event given through stdin or as the first argument
   relay    gets the relay information document for the given relay, as JSON
   admin    manage relays using the relay management API
   bunker   starts a nip46 signer daemon with the given --sec key
   serve    starts an in-memory relay for testing purposes
   blossom  an army knife for blossom things
   dekey    handles NIP-4E decoupled encryption keys
   encrypt  encrypts a string with nip44 (or nip04 if specified using a flag) and returns the resulting ciphertext as base64
   decrypt  decrypts a base64 nip44 ciphertext (or nip04 if specified using a flag) and returns the resulting plaintext
   gift     gift-wraps (or unwraps) an event according to NIP-59
   outbox   manage outbox relay hints database
   wallet   displays the current wallet balance
   mcp      pander to the AI gods
   curl     calls curl but with a nip98 header
   fs       mount a FUSE filesystem that exposes Nostr events as files.
   publish  publishes a note with content from stdin
   git      git-related operations
   nip      list NIPs or get the description of a NIP from its number
   sync     sync events between two relays using negentropy
   spell    downloads a spell event and executes its REQ request
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --quiet, -q    do not print logs and info messages to stderr, use -qq to also not print anything to stdout (default: false)
   --verbose, -v  print more stuff than normally (default: false)
   --help, -h     show help
   --version      prints the version (default: false) based E2E tests
2026-03-14 00:15:06 +01:00

38 lines
944 B
Elixir

import Config
config :logger, level: :warning
test_endpoint_port =
case System.get_env("PARRHESIA_TEST_HTTP_PORT") do
nil -> 0
value -> String.to_integer(value)
end
config :parrhesia, Parrhesia.Web.Endpoint,
port: test_endpoint_port,
ip: {127, 0, 0, 1}
config :parrhesia, enable_expiration_worker: false
pg_host = System.get_env("PGHOST")
repo_host_opts =
if is_binary(pg_host) and String.starts_with?(pg_host, "/") do
[socket_dir: pg_host]
else
[
hostname: pg_host || "localhost",
port: String.to_integer(System.get_env("PGPORT") || "5432")
]
end
config :parrhesia,
Parrhesia.Repo,
[
username: System.get_env("PGUSER") || System.get_env("USER") || "agent",
password: System.get_env("PGPASSWORD"),
database: System.get_env("PGDATABASE") || "parrhesia_test",
pool: Ecto.Adapters.SQL.Sandbox,
pool_size: 10
] ++ repo_host_opts