fix: use Bandit adapter via config — Phoenix boots on port 4001
- Add adapter: Bandit.PhoenixAdapter to config.exs and dev.exs - Phoenix reads adapter from app config, not from use macro option - Verified: Bandit 1.11.0 starts successfully on 0.0.0.0:4001 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
453a6deead
commit
97b99c3fe3
26 changed files with 17 additions and 7 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
erl_crash.dump
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
_build/dev/lib/centralcloud_my/consolidated/Elixir.IEx.Info.beam
Normal file
BIN
_build/dev/lib/centralcloud_my/consolidated/Elixir.IEx.Info.beam
Normal file
Binary file not shown.
BIN
_build/dev/lib/centralcloud_my/consolidated/Elixir.Inspect.beam
Normal file
BIN
_build/dev/lib/centralcloud_my/consolidated/Elixir.Inspect.beam
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
|||
defmodule CentralcloudMy.Endpoint do
|
||||
use Phoenix.Endpoint, otp_app: :centralcloud_my
|
||||
use Phoenix.Endpoint, otp_app: :centralcloud_my, adapter: Bandit.PhoenixAdapter
|
||||
|
||||
socket "/live", Phoenix.LiveView.Socket,
|
||||
websocket: [connect_info: [session: {CentralcloudMy.Router, :session_opts, []}]]
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
import Config
|
||||
|
||||
config :centralcloud_my, CentralcloudMy.Endpoint,
|
||||
adapter: Bandit.PhoenixAdapter,
|
||||
url: [host: "my.centralcloud.com"],
|
||||
http: [port: 4001]
|
||||
|
||||
config :centralcloud_ops, CentralcloudOps.Endpoint,
|
||||
adapter: Bandit.PhoenixAdapter,
|
||||
url: [host: "ops.centralcloud.com"],
|
||||
http: [port: 4000]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,22 @@
|
|||
import Config
|
||||
|
||||
config :centralcloud_my, CentralcloudMy.Endpoint,
|
||||
code_reloader: true,
|
||||
debug_errors: true,
|
||||
check_origin: false,
|
||||
watchers: []
|
||||
|
||||
config :centralcloud_ops, CentralcloudOps.Endpoint,
|
||||
adapter: Bandit.PhoenixAdapter,
|
||||
http: [port: 4001],
|
||||
secret_key_base: "dev_only_secret_key_base_do_not_use_in_prod_needs_64_chars_minimum_xx",
|
||||
code_reloader: true,
|
||||
debug_errors: true,
|
||||
check_origin: false
|
||||
|
||||
config :centralcloud_ops, CentralcloudOps.Endpoint,
|
||||
http: [port: 4000],
|
||||
secret_key_base: "dev_only_ops_secret_key_base_do_not_use_in_prod_needs_64_chars_min_xx",
|
||||
code_reloader: true,
|
||||
debug_errors: true,
|
||||
check_origin: false
|
||||
|
||||
# Disable Swoosh HTTP client in dev — no real email sending
|
||||
config :swoosh, :api_client, false
|
||||
|
||||
config :logger, :console, format: "[$level] $message\n"
|
||||
config :phoenix, :stacktrace_depth, 20
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue