I made this example.es script to run the example:
#!/usr/bin/env escript
main(_) ->
erlyweb:create_app("music", "/Users/sites"),
erlyweb:create_component("musician", "/Users/sites/music"),
erlydb:start(mysql, [{hostname, "localhost"}, {username, "monty"},
{password, "some_pass"}, {database, "music"}]),
erlyweb:compile("/Users/sites/music", [{erlydb_driver, mysql}]),
GL = [{ebin_dir, ["/Users/sites/music/ebin"]}],
SL = [{port, 3000},
{appmods, [{"/music", erlyweb}]},
{opaque, [{"appname", music}] }],
yaws:start_embedded( "/Users/sites/music/www", SL, GL ),
timer:sleep(1000000).
Then it's just
$./example.es
and it runs for 1000000 milliseconds or until I hit control-c.
I put yaws-1.74/ebin/* beams in my erlang lib path and 0.7 erlyweb.
On Jan 2, 4:09 am, "Dmitrii Dimandt" <[EMAIL PROTECTED]> wrote:
> > On 12/30/07, Dmitrii Dimandt <[EMAIL PROTECTED]> wrote:
> >> On 12/30/07, andrewfromfly < [EMAIL PROTECTED]> wrote:
> >> "and navigate tohttp://localhost:81/, I get erlyweb's welcome screen."
>
> >> you get that because the docroot is www and there is an index.html
> >> file in there. It's just straight up yaws webserver, No Erlyweb is
> >> being called.
>
> > It's like "doh, should've guessed myself" :)))))))) Must be the New Year's
> Eve
> > closing in on me :)
>
> Then I still don't understand why ErlyWeb crashes, because everything is
> ready and set up (or so it seems)
>
> I thought to myself: maybe it's because Erlang can't find the application's
> compiled files? I went ahead and edited yaws.conf:
>
> ebin_dir = /home/dmitriid/data/www/erlyweb/buktu/ebin
>
> Well, erlyweb crashes again, now for a different reason:
>
> ERROR erlang code crashed:
> File: appmod:0
> Reason: {function_clause,[{lists,dropwhile,
> [#Fun,undefined]},
> {erlyweb,get_ewc,2},
> {erlyweb,get_initial_ewc1,2},
> {erlyweb,handle_request,4},
> {yaws_server,deliver_dyn_part,8},
> {yaws_server,aloop,3},
> {yaws_server,acceptor0,2},
> {proc_lib,init_p,5}]}
> Req: {http_request,'GET',{abs_path,"/buktu"},{1,1}}
>
> :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"erlyweb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---