title: The router in my react app throws an error
body: <p>This is the error:</p>
  <pre><code> throw new TypeError('app.use() requires a middleware function')
      ^
  
  TypeError: app.use() requires a middleware function
      at Function.use (/Users/Andres/Desktop/chat-app-2/server/node_modules/express/lib/application.js:210:11)
      at Object.&lt;anonymous&gt; (/Users/Andres/Desktop/chat-app-2/server/index.js:13:5)
      at Module._compile (internal/modules/cjs/loader.js:1063:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
      at Module.load (internal/modules/cjs/loader.js:928:32)
      at Function.Module._load (internal/modules/cjs/loader.js:769:14)
      at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
      at internal/main/run_main_module.js:17:47
  [nodemon] app crashed - waiting for file changes before starting...
  </code></pre>
  <p>ROUTER.JS</p>
  <pre><code>    const express = require('express');
      const router = express.Router();
      
      router.get(`/`, (req, res) =&gt; {
          res.send('server is up and running');
      });
      
      module.export = router;
  
  </code></pre>
  <p>INDEX.JS</p>
  <pre><code>    const express = require('express');
      const socketio = require('socket.io');
      const http = require('http');
      
      const PORT = process.env.PORT || 5000;
      
      const router = require('./router');
      
      const app = express();
      const server = http.createServer(app);
      const io = socketio(server);
      
      app.use(router);
      
      server.listen(PORT, () =&gt; console.log(`Server has started on port ${PORT}`));
  </code></pre>
  <p>Can someone help me with these?</p>