title: Routing to other url in node.js
body: <p>I am currently working on a project where I have CRUD operation using node.js and mysql.</p>
  
  <pre><code>var mysql = require('mysql');
  var express = require('express');
  var session = require('express-session');
  
  var con = mysql.createConnection({
    host: "database",
    user: "admin",
    password: "pass",
    database: "db"
  });
  
  var app = express();
  
  
  con.connect(function(err) {
    if (err) throw err;
    con.query("SELECT * FROM shops where id =33", function (err, result, fields) {
      if (err) throw err;
      console.log(result);
    });
  });
  
  app.use('/shop', function(err) {
      con.query("SELECT * FROM shops where id =34", function (err, result, fields) {
      if (err) throw err;
      console.log(result);
  });
  });
  
  app.listen('3000', () =&gt; {
      console.log('Server started on port 3000');
  });
  </code></pre>
  
  <p>I want to get the shops data using localhost:3000/shops and brands data using localhost:3000/brands. But i don't know how to do that because i am very new in node.js. Infact,Today i my first day. I someone gives me som demo project or some thing like this. I will be very thankful.</p>