Configuration
The interface expected in the json file used as configuration is the following:
interface MutexoServerConfig {
network: "mainet" | "preview" | "preprod" | number;
threads: string;
logLevel: "debug" | "info" | "warn" | "error" | "none";
nodeSocketPath: string;
httpPort: number;
wsPorts: number[];
addrs: string[];
ignoreEnv: boolean;
disableLogColors: boolean;
}
each of which can be specified (and overwritten if the value is not an array) directly by the cli.
network
In the cli: -n or --network.
defaults to "mainnet";
it can be either the strings "mainnet", "preview", "preprod" or a number to be used as network magic (usually devnets and private testnets).
threads
In the cli: -t or --threads.
defaults to "50%".
it can be either a string representing a percentage or a number explicitly setting the number of threads to be used
(min 2, max os.availableParallelism()).
logLevel
In the cli: -l or --log-level.
defaults to "info".
it can be one of the following strings: "debug", "info", "warn", "error", "none".
sets the minimum severity level of logs to be printed.
nodeSocketPath
In the cli: -s or --node-socket-path.
If ignoreEnv is set to false (default), the default value of nodeSocketPath will be the CARDANO_NODE_SOCKET_PATH environment variable; otherwise defaults to "./node.socket".
if no socket path is found at the path used (either explicit or default), mutexo-server cannot work.
httpPort
In the cli: -hp or --http-port.
defaults to 3001.
port to be used by the http server to listen for requests (/wsAuth path).
wsPorts
In the cli: -ws or --ws-port (can be specified many times).
defaults to [] (empty array).
Array of ports to be used by the web socket server to listen for connections.
config.threads - 1 web socket servers will be started, each listening on a different port.
if not enough ports are specified, random (aviable) ports will be used.
addrs
In the cli: -a or --addr (can be specified many times).
--addr does NOT overwriteunlike other cli options, the addrs field in the configuration is not overwritten by the cli.
instead if one or more --addr options are used in the cli, the specified values will be appended to the configuration array.
defaults to [] (empty array).
It must be an array of shelley cardano addresses in bech32 (see CIP-19 for an in-depth description of cardano addresses).
ignoreEnv
In the cli: -E or --ignore-env.
defaults to false.
if explicitly setted to true, the environment variables, including the ones specified in .env files will be ignored.
CARDANO_NODE_SOCKET_PATHit is common in cardano development to use the environment variable CARDANO_NODE_SOCKET_PATH to indicate the path where the cardano-node socket is present.
if you use --ignore-env, make sure to specify a --node-socket-path.
disableLogColors
In the cli: --disable-log-colors.
defaults to false.
if set to true, the log output will not have colors.