No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Set capacitor's default server URL?

    Help
    capacitor config development server
    2
    3
    1587
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Y
      yhu420 last edited by

      Here is my configuration (hotspotdev.me is a hosts domain aliased to 127.0.0.1), for the devServer object in my quasar.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 the capacitor.config.json's server.url value, thus it is already set to hotspotdev.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.

      dobbel 1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel @yhu420 last edited by

        @yhu420

        Here’s another thread about this:
        https://forum.quasar-framework.org/topic/7563/quasar-dev-localhost-for-capacitor-apps?_=1611153616484

        1 Reply Last reply Reply Quote 0
        • Y
          yhu420 last edited by

          Thank you for pointing this out. Since no solution exist yet, I’ll open a github issue about this. Thank you for your input.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post