title: My app.js is not able to read my index.js
body: <p>I've included my index.js file in an external folder and I've used jQuery in it. But when I try to run my app.js I get an error. Below I've posted details of my code and error.</p>
  <p>here is my code for app.js:</p>
  <pre><code>    const express = require('express');
      const https = require('https');
      const bodyParser = require('body-parser');
      const jquery = require('jquery');
      
      const app=express();
      app.use('/jquery', express.static(__dirname + '/node_modules/jquery/dist/'));
      const inputs=require(__dirname+'\\public\\js\\index')
      
      app.use(bodyParser.urlencoded({extended: true}));
      app.use(express.static(&quot;public&quot;));
      app.get(&quot;/&quot;,function(req, res){
          res.sendFile(__dirname+&quot;/index.html&quot;);
      });
      app.listen(5000, function(){
          console.log(&quot;The server is started on port 5000&quot;);
      });
  </code></pre>
  <p>Here is my folder structure</p>
  <p><a href="https://i.stack.imgur.com/fds2U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fds2U.png" alt="Folder Structure" /></a></p>
  <p>And here is the error I get when I try to run my app.js</p>
  <p><a href="https://i.stack.imgur.com/SFsNi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SFsNi.png" alt="Error" /></a></p>