simpletut / Universal-React-Apollo-Registration

Open Source Universal User Registration System – NodeJS React Apollo GraphQL JWT MongoDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Accessing the app remotely

marksmithjobapps opened this issue · comments

Thank you for making the changes - I can now build the app and it works locally - however - I tried to clone and build the app on another machine (an old linux laptop) and when I do, it builds and starts as expected but I get the following error messages in the browser when I try to access it remotely on the machineIP:3000 - it seems it is looking to load the css, js and image assets from 'localhost' as I see the below in the browser console:

GET http://localhost:3000/assets/css/styles.min.css net::ERR_CONNECTION_REFUSED
http://localhost:3000/client_bundle.js net::ERR_CONNECTION_REFUSED
http://localhost:3000/assets/graphics/favicon.ico net::ERR_CONNECTION_REFUSED

I tested this by starting an instance of the application on my local windows machine and then refreshing the page to the linux laptop and the page loads as expected (it must be accessing the assets from the instance running on my local windows machine) as when I kill the app on the local windows machine and refresh the page the assets don't load again and I get the net::ERR_CONNECTION_REFUSED message...

Is there away to fix this so that the app looks to the IP running the app so that it can be accessed from another machine, as at the moment it seems that it will only work locally...

Thanks for your work on this project - it is excellent and getting this working has been a good learning experience for me...

Sorry, I'm an idiot - I needed to change the setting in the webConfig.json file...

Seen where I was going wrong...