title: Unable to understand the function of app.use('/') in express framework
body: <p>Here is my code -</p>
  <pre><code>//declared express, body-parser, mongodb, http, cors.
  
   var app = express();
  
   app.use(cors());
  
   app.use(express.urlencoded());
  
     // Parse JSON bodies (as sent by API clients)
    app.use(express.json());
  
     var CONNECTION_URL = &quot;mongodb://localhost:27017&quot;;
     var DATABASE_NAME = &quot;real_india_db0&quot;;
     var database = &quot;real_india_db0&quot;;
     var collection = &quot;db0&quot;
  
      app.listen(3000, () =&gt; {
        MongoClient.connect(CONNECTION_URL, { useNewUrlParser: true }, (error, client) =&gt; {
       if(error) {
          throw error;
      }
      database = client.db(DATABASE_NAME);
      collection = database.collection(&quot;db0&quot;);
      console.log(&quot;Connected to `&quot; + DATABASE_NAME + &quot;`!&quot;);
      });
  
   });
  
   app.post(&quot;/enterTasks&quot;, (request, response) =&gt; {
  
   var requestBody = [
  
      { 'taskId': 1,   'projectId' : 1,  'content' : {'name': 'Task 1' , 'predecessors':[], 
    'successor':  [{2}]  } ]
    console.log(&quot;abc ....&quot;, requestBody);
  
   });
  </code></pre>
  <p>After running -</p>
  <pre><code>  node app.js
  </code></pre>
  <p>I am hitting this particular url -</p>
  <pre><code> http://127.0.0.1:8081/enterTasks
  </code></pre>
  <p>But the console.log is not getting print in the developer console --&gt;</p>
  <pre><code>  console.log(&quot;abc ....&quot;, requestBody)
  
    
  </code></pre>
  <p>I wish to know why is this particular error taking place.</p>