title: find the error while deploying the node.js app to server
body: <p>I found the error while deploying the <code>node app</code> on the server. the index.js file code</p>
  <pre><code>const connectToDb = require(&quot;./DBconfig&quot;);
  const express = require('express')
  const router = express.Router();
  var cors = require('cors');
  
  connectToDb();
  const app = express();
  const port = process.env.PORT | 5000;
  app.use(cors());
  
  app.use(express.json());
  connectToDb();
  
  app.use( '/api/user' ,require('./routes/user') );
  app.use( '/api/post' ,require('./routes/post') );
  
  app.get('/', (req, res) =&gt; {
    res.send('The site is start now')
  })
  
  if(process.env.NODE_ENV === &quot;production&quot;){
    app.use(express.static(&quot;client/build&quot;));
    const path = require(&quot;path&quot;);
    app.get(&quot;*&quot;,(req,res)=&gt;{
      res.sendFile(path.resolve(__dirname,'client','build','index.html'))
    })
  }
  
  app.listen(port, () =&gt; {
    console.log(`Example app listening on port ${port}`)
  })
  </code></pre>
  <p>when I deploy the app and install the node in the server like <a href="https://i.stack.imgur.com/Ipwrt.png" rel="nofollow noreferrer">how I install the node in server</a> I attached the picture in which I show the installation of the node. and above I add the index.js code. It works properly in the local machine but if I hit the URL of backend <a href="https://backend.yourguide.pk/" rel="nofollow noreferrer">backendURL</a> it show the <code>service unavailable error</code> message  kindly give me the solution to solve this problem.</p>