Demo: Expose Remix app to local network (wifi) for mobile testing or sharing app with friends #7342
Replies: 4 comments 6 replies
-
Another Remix user in the discord also offered another alternative solution
|
Beta Was this translation helpful? Give feedback.
-
Anyway to get the hot reload and live updates with the default remix server? I keep getting WebSocket connection to 'ws://localhost:3001/socket' failed: on the console. I might be wrong but it seems to be hardcoded with localhost, I have no idea how to assign the IP address. |
Beta Was this translation helpful? Give feedback.
-
-- I will upload the files after doing the tutorials. haha. but thank you so much for the given feedback you gave. |
Beta Was this translation helpful? Give feedback.
-
For anybody using
https://vitejs.dev/config/ can help if you need to customize the configuration depending on enviroments. |
Beta Was this translation helpful? Give feedback.
-
Background Context
During local development of my remix app, I wanted a way to expose my web app locally on my wifi network so I could load the app on my smartphone, tablet or even let other people connected to my wifi view the app.
Solution
address.ip()
to obtain the local IP of your computerThe cool thing about this is that hot reload and live updates still work with both URLs.
So if you're making updates on your app, your other devices viewing the app via the LAN url will get those updates too
References
Beta Was this translation helpful? Give feedback.
All reactions