title: I tried hosting a node js application on cpanel but receiving following error while accessing Cannot GET /app/customers
body: <p>I tried creating a node js application in cpanel. The code was working fine in localhost but in cpanel I get the following error
  Cannot GET /app/customers
  Here is my code</p>
  <pre><code>const dboperations = require('./dboperations');
  var table = require('./table');
  
  var express =require('express');
  var bodyParser = require('body-parser');
  var cors = require('cors');
  const { user } = require('./dbconfig');
  const { request, response } = require('express');
  var app = express();
  
  var router = express.Router();
  
  app.use(bodyParser.urlencoded({extended:true}));
  app.use(bodyParser.json());
  app.use(cors());
  app.use('/api',router);
  
  
  router.use((request,response,next)=&gt;{
      next();
  })
  
  router.route('/customers').get((request,response)=&gt;{
      dboperations.getCustomers().then(result =&gt; {
          response.json(result);
      })
  })
  router.route('/customer/:id').get((request,response)=&gt;{
      dboperations.getCustomer(request.params.id).then(result =&gt; {
          response.json(result);
      })
  })
  var port = process.env.PORT || 8090;
  app.listen(port);
  console.log('API is running at' + port);
  </code></pre>