Set capacitor's default server URL?
-
Here is my configuration (
hotspotdev.me
is a hosts domain aliased to 127.0.0.1), for the devServer object in myquasar.conf.js
:devServer: { https: false, port: 8080, //host: 'hotspotdev.me' }
I can access my dev server well in my local network. The capacitor app launches great, I can even edit my
assets/capacitor.config.json
to:"server": { "url": "http://hotspotdev.me:8080" // previously here: my local IP }
However, if I uncomment the
host
line, I can’t access the dev server from my local network.devServer: { https: false, port: 8080, host: 'hotspotdev.me' }
The capacitor config file is seems to use this
host
value for thecapacitor.config.json
'sserver.url
value, thus it is already set tohotspotdev.me:8080
. However, I can’t connect anymore (connection refused).Is there a way to set a default
server.url
value for Capacitor, while not having to edit the host of my dev server? Is there another way to tackle this issue? Thank you. -
Here’s another thread about this:
https://forum.quasar-framework.org/topic/7563/quasar-dev-localhost-for-capacitor-apps?_=1611153616484 -
Thank you for pointing this out. Since no solution exist yet, I’ll open a github issue about this. Thank you for your input.