I'm exploring Yaws and I've read the Yaws manual and the Building Web Applications with Erlang book. I've followed every step in the book's last chapter where a multi_cast app is built, but I can't run it. I believe it's the Erlang code which isn't being found or used.
I've got a project dir in my home directory and I've pointed Yaws docroot for this particular Virtual Server to my project directory where a htdocs dir with the .yaws files reside.
<server localhost>
port = 8001
listen = 127.0.0.1
docroot = <my_path_here>/erlang_yaws/multi_cast
</server>
and I've changed the ebin_dir to also point to the project´s ebin directory:
ebin_dir = <my_path_here>/erlang_yaws/multi_cast/_build/default/lib/multi_cast/ebin
Upon starting Yaws with yaws -i I can go to some simple .yaws files I've got which do not rely on any of the project´s .beam files. However, when I change my browser's location to a .yaws files which rely on the app's compiled files I get the following error:
=ERROR REPORT==== 21-Jan-2017::14:27:17 ===
ERROR erlang code threw an uncaught exception:
File: <my_path_here>/erlang_yaws/multi_cast/htdocs/status.yaws:1
Class: exit
Exception: {noproc,{gen_server,call,[multi_cast_front,{get_etag}]}}
Req: {http_request,'GET',{abs_path,"/htdocs/status.yaws"},{1,1}}
Stack: [{gen_server,call,2,[{file,"gen_server.erl"},{line,204}]},
{m_27449121_1,out,1,
[{file,"<my_path_here>/.yaws/yaws/default/m_27449121_1.erl"},
{line,35}]},
{yaws_server,deliver_dyn_part,8,
[{file,"yaws_server.erl"},{line,2872}]},
{yaws_server,aloop,4,[{file,"yaws_server.erl"},{line,1242}]},
{yaws_server,acceptor0,2,[{file,"yaws_server.erl"},{line,1065}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]
I believe this is due to the fact that my gen_server app isn't starting correctly or not being found? The source code seems to compile successfully.
I'm on MacOS Sierra with Yaws 2.0.4, Erlang 19 and I did a regular Yaws install with homebrew.
Also, is there a resource which thoroughly explains how to structure Yaws and a simple application? Reading both the manual and the book and both fail at explaining this (or I'm really thick), and it's quite frustrating to get stuck from a user experience viewpoint.