-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Mochiweb/Webmachine with Cowboy/Cowmachine. #1355
Conversation
Yeah, great start! 🐮 |
@@ -4,6 +4,14 @@ | |||
2}, | |||
{<<"bert">>,{pkg,<<"bert">>,<<"0.1.0">>},0}, | |||
{<<"cf">>,{pkg,<<"cf">>,<<"0.2.1">>},1}, | |||
{<<"cowboy">>, | |||
{git,"git://github.com/ninenines/cowboy.git", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why no hex.pm dependencies?
(oh wait, different branch, probably)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, we are using the master (2.0 development) version of cowboy.
Also fix syntax errors and make modules_dir/sites_dir optional.
Conflicts: rebar.lock
Docs didn't build correctly with them.
And it’s green! 👏 @mworrell As you’ve just converted Zotonic’s internal controllers, would you mind adding a section to
|
@ddeboer Added docs, also updates some out of date information. |
We should also check chapters like directory structure that are not updated with the rebar3 changes. |
Great!
Let’s remove it.
As that doesn’t have to do with this change (Cowboy) per se, I created a separate issue for that: #1399. |
Let's warn the mailing list before we merge, as this is an incompatibel and quite drastic change. |
* The return value of `generate_etag` must be a binary | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is a great start. I’ll probably slightly rewrite this later for better developer experience. 😉 I noted that in #1399.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to add an example controller in the documentation, showing all possible callbacks.
We have warned the mailing list and on twitter, so I think we can merge. |
Let’s give everyone one more day to look at this; if we hear no objections, I’ll squash and merge this tomorrow. |
BOOM! 💣 🔥 🎆 🚒 |
Fixes #533
See also: https://github.com/zotonic/cowmachine 🐮
mochiweb
/webmachine
http server initializationcowboy
http server initializationwebmachine
from deps#wm_reqdata{}
with typemochiweb_req:req()
wrq
with calls tocowmachine_req
Context
argumentContext
argumentProposal is to move the re-addittion of the access log (
z_access_log
,z_stats
,z_access_syslog
and request watchers) to another separate issue.