mix tahr.serve (tahr v0.1.0)

Copy Markdown View Source

Starts a Tahr.RPC.Server serving Tahr.InMemory and blocks until the process is terminated.

Useful for smoke testing against a real NFS client without wiring the server into an application.

Usage

mix tahr.serve [options]

With no options, serves Tahr.InMemory on 127.0.0.1:2049.

Options

  • --port N — TCP port to listen on (default: 2049). Pass 0 to bind an ephemeral port; the actual port is printed.

  • --bind ADDRESS — IP address to bind to (default: 127.0.0.1).

Examples

# Zero-config: in-memory backend on 127.0.0.1:2049
mix tahr.serve

# Mount it from another terminal
sudo mount -t nfs -o vers=3,tcp,port=2049,mountport=2049 \
  127.0.0.1:/export /mnt/nfs

# Serve on all interfaces
mix tahr.serve --bind 0.0.0.0