When opening the application (or refreshing the page) from another URL than /, the devtool phoenix server returns an error because it doesn't know the URL.
In fact, specifically for the devtool, the client is generated as HTML and put into the static folder of the phoenix server. This means that this server needs to define the routes that will be redirected to this static file. But as we can see in the current state of the router.ex file :
scope "/", DevTool do
get("/", IndexController, :index)
end
Only the / route directs to the client which is handled by the IndexController. This means that any other route than / will not work when it is firstly opened or refreshed on.
We need to find a way to make this router redirect any route to the IndexController without interfering with other already defined routes.
What happened?
When opening the application (or refreshing the page) from another URL than
/
, the devtool phoenix server returns an error because it doesn't know the URL.In fact, specifically for the devtool, the client is generated as HTML and put into the static folder of the phoenix server. This means that this server needs to define the routes that will be redirected to this static file. But as we can see in the current state of the
router.ex
file :Only the
/
route directs to the client which is handled by the IndexController. This means that any other route than/
will not work when it is firstly opened or refreshed on.We need to find a way to make this router redirect any route to the IndexController without interfering with other already defined routes.
What browsers are you seeing the problem on?
Other (specify above)
Version
v1.0.0-alpha.2
Relevant log output
No response