Skip to content

Reloading not working with single-file exs app? #65

Description

@thbar

I tried adding reloading to a simple Bandit/Plug app:

Mix.install([
  {:bandit, "~> 1.9"},
  {:exsync, "~> 0.4.1"}
])

defmodule MyPlug do
  import Plug.Conn

  def init(options) do
    options
  end

  def call(conn, _opts) do
    conn
    |> put_resp_content_type("text/plain")
    |> send_resp(200, "Hello world - it's #{DateTime.utc_now()}")
  end
end

Bandit.start_link(plug: MyPlug)
Process.sleep(:infinity)

Running it with elixir web.exs, I see ExSync starting, but nothing happens if I modify & save web.exs.

Not sure what is happening yet!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions