Was running into some issues getting dathttpd to play nicely with pw2
dathttpd-error-2.log
Trying to run dathttpd via pm2 would continuously return the above error.
Line 73 of /lib/server.js is what the error references: var dat = dats.find(function (d) { return d.key.toString('hex') === site.datKey })
So looks to be an issue with how the directory's path is handled from pm2, which is (probably?) causing line 73 to return undefined.
I was able to resolve it by manually specifying my directory in the config yml as ~/home/stephen/.dathttpd (adding the tilde is what fixed it)