Directory issue when daemonizing via pw2
Was running into some issues getting dathttpd to play nicely with pw2
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)
Hey @stephenkistner
You mind sharing your config file? That would help me diagnose the issue.
Sure, here it is:
ports:
http: 5757
directory: ~/home/stephen/.dathttpd
letsencrypt: false
sites:
dat.with.sk:
url: dat://997759aded033555f983211b2fa88a5d9f8f4a7aca33cedfba4d006c2ce8972d/
now.with.sk:
url: dat://d51f7e84e34ed9203721b85b92ad58a353ee3dd1592e8b68e53c62a7d010e7c1/
Hm, ok thanks for sharing. I'll see if I can figure out what's happening