Let’s Build |> a Slack Clone with Elixir, Phoenix, and React (part 3— Frontend Authentication)
Ben Hansen
255

Hey Ben, absolutely amazing guide. I was wondering if during your development if you had any issues accessing the application from another device on your network. I’m not yet at the steps of deployment and have been loosely following your guide to work on an idea I’ve had where instead of chats I’m using todos but it a similar concept. However my issue is that although I am able to continue developing/working/accessing the application just fine on the computer that I am serving the phoenix api/react development server, if I try to access the frontend from another device on my network(such as my phone on wifi) (http://localhost:3000) where localhost is the network IP address , I see a

“Failed to load resource: net::ERR_CONNECTION_REFUSED http://localhost:4000/api/sessions” and if I console.log/catch the error from the api post utils I see “Type error failed to fetch” which makes it impossible to even login.

I don’t see any logs on Phoenix so it seems that this may have something to do with how the request is made in regards to CORS? Is this something you have come across? I appreciate any and all help as this has been nearly impossible to debug.

Show your support

Clapping shows how much you appreciated Sceptre’s story.