title: while Integrating nodejs -mysql module file into app.use getting an error file notfound error404
body: <p>I created a nodejs-mysql file .
  when i give listen(8084) port number and test on browser it displays data .
  when i integrate into main folder app.use('/', salonsce_fournisseur) which use default 3000 port and without 8084 number .
      it is showing an error 404 file not found.
      some body please explain to me where i am doing mistake.
  here is the code</p>
  
  <pre><code>    var express = require('express');
      var app = express();
      var router = express.Router();
      var http = require('http');
      var mysql = require('mysql');
      var url = require('url');
      var connection = mysql.createConnection({
              host: 'localhost',
              user: 'root',
              database: 'test'
          });
  
      var fournisseurJoinsQuery = 'SELECT     * FROM  `salonsce_fournisseurs`;
      console.log('MySQL Connection details  '+connection);
      http.createServer(function (req, res) 
      { 
              var url_parts = url.parse(req.url, true);
          var query1 = url_parts.query;
          console.lop('kkkkkkkkkkkkkkkkk')
          console.log(query1);
          console.log('Creating the http server');
          connection.query(fournisseurJoinsQuery , function(err, rows, fields)
          {   
  
              console.log('Connection result error '+err);
              console.log('no of records is '+rows.length);
              res.writeHead(200, { 'Content-Type': 'application/json'});
              res.end(JSON.stringify({"success":1,"count":rows.length,"results":rows}));
              res.end();
          }); 
  
      });
  </code></pre>
  
  <p>module.exports = router;</p>
  
  <pre><code>my app.js code is:
  
  
  var express = require('express');
  var path = require('path');
  var favicon = require('serve-favicon');
  var logger = require('morgan');
  var cookieParser = require('cookie-parser');
  var bodyParser = require('body-parser');
  //var mysql = require('mysql');
  
  var routes = require('./routes/index');
  var users = require('./routes/users');
  var files = require('./routes/files');
  
  var salonsce_photos = require('./routes/salonsce.photos');
  var salonsce_fournisseur = require('./routes/salonsce.fournisseur');
  
  var app = express();
  
  // view engine setup
  app.set('views', path.join(__dirname, 'views'));
  app.set('view engine', 'jade');
  
  
  app.use('/', routes);
  app.use('/users', users);
  app.use('/salonsce.photos', salonsce_photos);
  app.use('/salonsce.fournisseur', salonsce_fournisseur);
  </code></pre>
  
  <p>});</p>
  
  <pre><code>module.exports = app;
  </code></pre>
  
  <p>if i type on url : localhost:3000/salonsce.fournisseur it should display the data.
  Thanks in advance.</p>