Skip to content

Config file ​

ahpw serve reads ~/.config/ahpw/config.json, and pnpm dev reads its tlsCert, tlsKey and domain. Every option can go in it, spelled the same without the dashes:

json
{
  "connect": "ws://127.0.0.1:9187",
  "tokenFile": "~/.config/ahpd/token",
  "port": 5190
}
KeyType
connectstring
tokenstring
tokenFilestring. A ~ at the start is your home folder
hoststring
portinteger
openboolean
clientNamestring
clientTitlestring
tlsCertstring, a path. A ~ at the start is your home folder
tlsKeystring, a path. A ~ at the start is your home folder
domainstring, a bare host name

A key serve does not take, or a value of the wrong type, stops it with an error. Keep one of token and tokenFile.

A flag beats the file, and the file beats the environment.