Skip to content

Commit c8d9357

Browse files
committed
update issue examples to use bandit and include phoenix_html
1 parent 0f9d1da commit c8d9357

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.github/single-file-samples/main.exs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
Application.put_env(:sample, Example.Endpoint,
22
http: [ip: {127, 0, 0, 1}, port: 5001],
3+
adapter: Bandit.PhoenixAdapter,
34
server: true,
45
live_view: [signing_salt: "aaaaaaaa"],
56
secret_key_base: String.duplicate("a", 64)
67
)
78

89
Mix.install(
910
[
10-
{:plug_cowboy, "~> 2.5"},
11+
{:bandit, "~> 1.8"},
1112
{:jason, "~> 1.0"},
12-
{:phoenix, "~> 1.7"},
13+
{:phoenix, "~> 1.8"},
14+
{:phoenix_html, "~> 4.0"},
1315
# please test your issue using the latest version of LV from GitHub!
1416
{:phoenix_live_view,
1517
github: "phoenixframework/phoenix_live_view", branch: "main", override: true}
@@ -42,6 +44,8 @@ defmodule Example.HomeLive do
4244
</script>
4345
<script src="/assets/phoenix_live_view/phoenix_live_view.js">
4446
</script>
47+
<script src="/assets/phoenix_html/phoenix_html.js">
48+
</script>
4549
<%!-- uncomment to use enable tailwind --%>
4650
<%!-- <script src="https://cdn.tailwindcss.com"></script> --%>
4751
<script>
@@ -93,6 +97,7 @@ defmodule Example.Endpoint do
9397

9498
plug Plug.Static, from: {:phoenix, "priv/static"}, at: "/assets/phoenix"
9599
plug Plug.Static, from: {:phoenix_live_view, "priv/static"}, at: "/assets/phoenix_live_view"
100+
plug Plug.Static, from: {:phoenix_html, "priv/static"}, at: "/assets/phoenix_html"
96101

97102
plug(Example.Router)
98103
end

.github/single-file-samples/test.exs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
Application.put_env(:phoenix, Example.Endpoint,
22
http: [ip: {127, 0, 0, 1}, port: 5001],
3+
adapter: Bandit.PhoenixAdapter,
34
server: true,
45
live_view: [signing_salt: "aaaaaaaa"],
56
secret_key_base: String.duplicate("a", 64)
67
)
78

89
Mix.install(
910
[
10-
{:plug_cowboy, "~> 2.5"},
11+
{:bandit, "~> 1.8"},
1112
{:jason, "~> 1.0"},
12-
{:phoenix, "~> 1.7"},
13+
{:phoenix, "~> 1.8"},
1314
# please test your issue using the latest version of LV from GitHub!
1415
{:phoenix_live_view,
1516
github: "phoenixframework/phoenix_live_view", branch: "main", override: true},
@@ -37,6 +38,8 @@ defmodule Example.HomeLive do
3738
</script>
3839
<script src="/assets/phoenix_live_view/phoenix_live_view.js">
3940
</script>
41+
<script src="/assets/phoenix_html/phoenix_html.js">
42+
</script>
4043
<script>
4144
let liveSocket = new window.LiveView.LiveSocket("/live", window.Phoenix.Socket)
4245
liveSocket.connect()
@@ -75,6 +78,7 @@ defmodule Example.Endpoint do
7578
socket("/live", Phoenix.LiveView.Socket)
7679
plug Plug.Static, from: {:phoenix, "priv/static"}, at: "/assets/phoenix"
7780
plug Plug.Static, from: {:phoenix_live_view, "priv/static"}, at: "/assets/phoenix_live_view"
81+
plug Plug.Static, from: {:phoenix_html, "priv/static"}, at: "/assets/phoenix_html"
7882
plug(Example.Router)
7983
end
8084

0 commit comments

Comments
 (0)