You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defmodule MyApp.Router do
use MyApp.Web, :router
if Mix.env == :dev do
forward("/sent_messages", Apus.SentMessagesViewerPlug)
end
end
After iex -S mix, it tells:
** (UndefinedFunctionError) function Apus.SentMessagesViewerPlug.init/1 is undefined (module Apus.SentMessagesViewerPlug is not available)
Apus.SentMessagesViewerPlug.init([])
And I checked the file, no init() and call() functions, which should be required by Plug module.
The text was updated successfully, but these errors were encountered:
The sent messages plug uses the Plug.Router module which implements the init and call functions for us.
Can you please let me which version of apus and elixir you are running and are you seeing this error when attempting to visit the url?
Also to note from your router config it looks like you are using phoenix. If this is the case, when running your app through iex you will need to specify that you want to start the phoenix server as well. You can do this using this command iex -S mix phx.server.
In my
my_app/lib/my_app_web/router.ex
:After
iex -S mix
, it tells:And I checked the file, no init() and call() functions, which should be required by Plug module.
The text was updated successfully, but these errors were encountered: