title: Quasar App Routing Problems
body: <p>I am developing a Quasar App right now. So far I only have a login page and the default layout that quasar provides. I have a separate server I have set up running at port 100. I already set up the proxy to redirect all calls from axios and socket.io to my server which hosts my mySQL database for my application. I already set up my routes and if I manually type in the route in the browser's search I can go to it but once I use this.$router.push() in my login to go to the main page it doesn't navigate to it. For example I'm hosting this app on port 8080. By default it'll go to the login page which is: "localhost:8080". When the login authenticates, the user is supposed to be redirected to the main page within my quasar app using this.$router.push('/main'). However, it does not do this. When I press login, the url just changes to "localhost:8080/?". However, if I manually type in: "localhost:8080/main" in the browser it directs me toward the main page.
  Here is the code for my routes:</p>
  
  <pre><code>export default [
  { 
      path: '/', 
      component: () =&gt; import('components/login'),
    },
  
    {
      path: '/main',
      component: () =&gt; import('layouts/default'),
      children: [
        { path: '', component: () =&gt; import('pages/index') },
        { path: 'chat', component: () =&gt; import('components/chat')}
      ]
    },
  
    { // Always leave this as last one
      path: '*',
      component: () =&gt; import('pages/404')
    }
  ]
  </code></pre>
  
  <p>Here is my code for my login component:</p>
  
  <pre><code>&lt;template&gt;
      &lt;div&gt;
          &lt;form id="login" label="Login"&gt;
              &lt;q-input type="text" float-label="Username" v-model="username" /&gt; &lt;br&gt;
              &lt;q-input v-model="password" type="password" float-label="Password" /&gt;
              &lt;q-btn input type="submit" @click="authenticate()"&gt;Submit&lt;/q-btn&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;style&gt;
      input{
          margin: 10px;
      }
      #login{
          vertical-align: middle;
          text-align: center;
      }
  &lt;/style&gt;
  
  &lt;script&gt;
  
  module.exports = {
    data() {
      return {
        username: '',
        password: ''
      }
    },
    methods: {
      authenticate () {
        this.$axios.post('/api/login', {
          Username: this.username,
          Password: this.password
        })
          .then(response =&gt; {
            this.$Socket.emit('LoginInfo', {
              firstname: response.data[0].ClientFirstName,
              lastname: response.data[0].ClientLastName,
              name: response.data[0].ClientFirstName + ' ' + response.data[0].ClientLastName,
              userid: response.data[0].ClientID
            })
            console.log(this.$router)
            this.$router.push({path: '/main'})
          })
          .catch(function (error) {
            console.log(error)
          })
      }
    }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>I've spent hours trying to search up what might be the problem but so far I've come up with nothing useful. Maybe it might be a bug? My colleague looked over my code and he sees no problem as well. Hopefully you guys can help me out. I would really appreciate it.</p>
  
  <p>As requested, the server code:</p>
  
  <pre><code>const Express=require('express');
  const path=require('path');
  var cors = require('cors')
  var app = Express();
  var http = require('http').Server(app);
  var io = require('socket.io')(http);
  var mysql = require('mysql');
  
  var con = mysql.createConnection({
    host: "localhost",
    user: "root",
    password: "",
    database: "ChatDB"
  });
  
  con.connect(function(err) {
    if (err)throw err;
    /*let query="INSERT INTO Client(ClientUserName, ClientPassword, ClientFirstName, ClientLastName) VALUES(\"jeffrey\", \"penner\", \"Jeffrey\", \"Penner\")";
    con.query(query, function(err, result){
      if(err) throw err;
    })*/
    console.log("Connected!");
  });
  
  io.set('origins', 'http://localhost:8080');
  
  app.use(Express.json())
  //app.use('/public', Express.static(path.join(__dirname, 'public')));
  app.use(cors());
  
  app.post('/login', cors(), function(req, res){
    let a=req.body.Username;
    let b=req.body.Password;
    let query="SELECT ClientID, ClientFirstName, ClientLastName FROM Client WHERE ClientUsername=\'" + a + "\' AND ClientPassword=\'" + b + "\';";
    con.query(query, function (err, rows) {
      if (err){
        throw err;
      }
      else if(rows.length)
      {
        console.log(rows);
        res.json(rows);
      }
    })
  });
  
  io.on('connection', function(socket){
    console.log('a user connected');
    socket.on('disconnect', function(){
      console.log('user disconnected');
    });
    socket.on('LoginInfo', function(data) {
      console.log(data)
    });
  })
  
  http.listen(100, function(){
    console.log('listening on *:100')
  });
  </code></pre>
  
  <p>index.js for router code:</p>
  
  <pre><code>import Vue from 'vue'
  import VueRouter from 'vue-router'
  
  import routes from './routes'
  
  Vue.use(VueRouter)
  
  const Router = new VueRouter({
    /*
     * NOTE! Change Vue Router mode from quasar.conf.js -&gt; build -&gt; vueRouterMode
     *
     * If you decide to go with "history" mode, please also set "build.publicPath"
     * to something other than an empty string.
     * Example: '/' instead of ''
     */
  
    // Leave as is and change from quasar.conf.js instead!
    mode: process.env.VUE_ROUTER_MODE,
    base: process.env.VUE_ROUTER_BASE,
    scrollBehavior: () =&gt; ({ y: 0 }),
    routes
  })
  
  export default Router
  </code></pre>