getting proxied server data to play app



  • Can’t get play app to pull from my feathers server when it is proxied (works fine within my dev machine).

    Given the IP of my dev machine on the network taken from the QR code I changed the dev config files and restarted the quasar dev, and feathers servers. On my dev machine I can visit the ip address and it all works fine but if I do that in the play app none of the server data dependent rendering happens.

    How do I set up my feathers server to play nice with the quasar play app?? It’s not play app specific issue as the same happens in a browser in my phone but hoping someone here uses feathers and has figured out the right settings. If not I guess I’ll go ask the feathers folks. Basically the proxy appears not to be working across machines.

    WEBPACK/QUASAR CONFIG index.js

        proxyTable: {
      '/api': {
        // target: 'http://localhost:3030',
        target: 'http://192.168.43.114:3030', // samsung phone network
        changeOrigin: true
      }
    

    FEATHERS CONFIG

    {
      "host": "192.168.43.114",
      "port": 3030,
      "public": "../public/",
      "paginate": {
        "default": 100,
        "max": 100
      },```


  • SOLVED,

    Missed one other place in the feathers client module that needed to be changed. works now.

    import feathers from 'feathers'
    import hooks from 'feathers-hooks'
    import socketio from 'feathers-socketio'
    import auth from 'feathers-authentication-client'
    import io from 'socket.io-client'
    
    // const socket = io('http://localhost:3030', {transports: ['websocket']})
    const socket = io('http://192.168.43.114:3030', {transports: ['websocket']})
    
    const api = feathers()
      .configure(hooks())
      .configure(socketio(socket))
      .configure(auth({ storage: window.localStorage }))
    
    api.service('/users')
    api.service('/switches')
    
    export default api
    

Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.