The binary will automatically look for some existing configuration files:
*`./happydns.conf` in the current directory;
*`$XDG_CONFIG_HOME/happydns/happydns.conf`;
*`/etc/happydns.conf`.
Only the first file found will be used.
It is also possible to specify a custom path by adding it as argument to the command line:
```
./happydns /etc/happydns/config
```
#### Config file format
Comments line has to begin with #, it is not possible to have comments at the end of a line, by appending # followed by a comment.
Place on each line the name of the config option and the expected value, separated by `=`. For example:
```
storage-engine=leveldb
leveldb-path=/var/lib/happydns/db/
```
#### Environment variables
It'll also look for special environment variables, beginning with `HAPPYDNS_`.
You can achieve the same as the previous example, with the following environment variables:
```
HAPPYDNS_STORAGE_ENGINE=leveldb
HAPPYDNS_LEVELDB_PATH=/var/lib/happydns/db/
```
You just have to replace dash by underscore.
Development environment
-----------------------
If you want to contribute to the frontend, instead of regenerating the frontend assets each time you made a modification (with `go generate`), you can use the development tools:
In one terminal, run `happydns` with the following arguments:
With this setup, static assets integrated inside the go binary will not be used, instead it'll forward all requests for static assets to the node server, that do dynamic reload, etc.