title: GET (query string) variables in Express.js on Node.js?
body: <p>Good guys,
  I wrote the express API which works perfectly well when tested with POSTMAN but couldn't do same when i try to get a responds displayed on the browser. Would be glad to know where i went wrong from my code base.</p>
  <p>Thanks.</p>
  <p>My code base below:</p>
  <pre class="lang-js prettyprint-override"><code>require('dotenv').config();
  const express = require('express');
  const mongoose = require('mongoose');
  const bdclRoutes = require('./routes/bdcl.routes');
  
  mongoose.connect(process.env.MONGODB_URI, {
      useFindAndModify: false,
      useNewUrlParser: true,
      useUnifiedTopology: true,
      useCreateIndex: true
  });
  mongoose.connection.once('open', () =&gt; {
      console.log('Connected to database successfully....')
  }).on('error', () =&gt; {&lt;br/&gt;
      console.log('Database connection failed.....')
  });
  
  
  const app = express();
  app.use(express.json());
  
  app.get('/', (req, res) =&gt; {
      // res.send('Welcome to BDCL student API')
  });
  app.use('/api/2020/bdcl_students/uploads', express.static('./uploads'));
  app.use('/api/2020', bdclRoutes);
  
  
  app.listen(process.env.PORT, () =&gt; {
      console.log(`server started and app running at port ${process.env.PORT}`)
  });
  
  </code></pre>