Skip to content

Commit

Permalink
use latest version of ace
Browse files Browse the repository at this point in the history
  • Loading branch information
CrowdHailer committed Aug 23, 2017
1 parent ab2446a commit 817e301
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Example chat application built with [Tokumei](https://hex.pm/packages/tokumei).

```
cd water_cooler
docker-compose up
docker-compose up -d
docker-compose scale web=3
```

Expand Down
8 changes: 4 additions & 4 deletions lib/water_cooler/www.ex
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ defmodule WaterCooler.WWW do

def handle_info({stream, request}, :ready) do
case {request.method, request.path} do
{"GET", "/"} ->
{:GET, "/"} ->
body = home_page()
response = Ace.Response.new(200, [], body)
Ace.HTTP2.Server.send_response(stream, response)
{:noreply, :done}
{"GET", "/updates"} ->
{:GET, "/updates"} ->
{:ok, _} = ChatRoom.join()
response = Ace.Response.new(200, [{"content-type", "text/event-stream"}], true)
Ace.HTTP2.Server.send_response(stream, response)
{:noreply, {:updates, stream}}
{"POST", "/"} ->
{:POST, "/"} ->
true = request.body
{:noreply, :reading}
{"GET", _} ->
{:GET, _} ->
body = not_found()
response = Ace.Response.new(404, [], body)
Ace.HTTP2.Server.send_response(stream, response)
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defmodule WaterCooler.Mixfile do

defp deps do
[
{:ace, "~> 0.12.1"},
{:ace, "~> 0.13.0"},
{:server_sent_event, "~> 0.2.0"},
{:exsync, "~> 0.2.0"},
{:wobserver, "~> 0.1.8"}
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%{"ace": {:hex, :ace, "0.12.1", "c3a997c582158a2f09c99cbc596a53fbb77091f9e7d951e7d0c3d46a9f9ca1f9", [], [{:hpack, "~> 0.2.3", [hex: :hpack_erl, repo: "hexpm", optional: false]}, {:raxx, "~> 0.11.1", [hex: :raxx, repo: "hexpm", optional: false]}], "hexpm"},
%{"ace": {:hex, :ace, "0.13.0", "f135fbbb24261ff820554fdd655fc77ae7059748cd651a4626493fe75d7d0c80", [:mix], [{:hpack, "~> 0.2.3", [hex: :hpack_erl, repo: "hexpm", optional: false]}, {:raxx, "~> 0.11.1", [hex: :raxx, repo: "hexpm", optional: false]}], "hexpm"},
"certifi": {:hex, :certifi, "2.0.0", "a0c0e475107135f76b8c1d5bc7efb33cd3815cb3cf3dea7aefdd174dabead064", [], [], "hexpm"},
"cowboy": {:hex, :cowboy, "1.1.2", "61ac29ea970389a88eca5a65601460162d370a70018afe6f949a29dca91f3bb0", [], [{:cowlib, "~> 1.0.2", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.3.2", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm"},
"cowlib": {:hex, :cowlib, "1.0.2", "9d769a1d062c9c3ac753096f868ca121e2730b9a377de23dec0f7e08b1df84ee", [], [], "hexpm"},
Expand Down

0 comments on commit 817e301

Please sign in to comment.