[erlang-questions] cowboy throwing a routing error
AD
straightflush@REDACTED
Thu Jan 10 15:11:16 CET 2013
hello,
Using sockjs and the latest cowboy/ranch, I am running into a badarg
error with cowboy_router. Not sure what is causing this, i captured the
debug info here in this gist
https://gist.github.com/4502255
I am starting like this
SockjsState = sockjs_handler:init_state(<<"/socket">>,fun
wsocket_handler/3, state, []),
VRoutes = [{[<<"socket">>, '...'], sockjs_cowboy_handler, SockjsState},
{'_', ?MODULE, []}],
Routes = [{'_', VRoutes}],
lager:info("Starting the cowboy listener on port ~p..~n",[?COWBOY_HTTP_PORT]),
cowboy:start_http(my_http_listener, ?COWBOY_HTTP_ACCEPTORS, [{port,
?COWBOY_HTTP_PORT}], [{dispatch, Routes}]).
But the call to lists:keyfind(dispatch, 1, Env) seems to be failing
for some reason.
Any ideas ?
Thanks
- AD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130110/d8b260a9/attachment.htm>
More information about the erlang-questions
mailing list