title: cannot read property 'get' undefined in express when using express router
body: <p>Here is my app.js code:</p>
  
  <pre><code>const bodyparser = require('body-parser');
  const express = require('express');
  
  const ShopRoutes = require('./routes/shop');
  const AdminRoutes = require('./routes/admin');
  const app = express();
  app.use(bodyparser.urlencoded({extended:false}));
  app.use(ShopRoutes);
  app.use(AdminRoutes);
  
  app.listen(3000);
  </code></pre>
  
  <p>both the admin and shop routes interchangeably do not work so I'll post one:</p>
  
  <pre><code>const express = require('express');
  
  const Router = express.Router();
  
  Router.get('/add-product', (req,res, next)=&gt;{
      res.send('&lt;form action="/product" method="POST"&gt;&lt;input type="text" name="title"&gt;&lt;/input&gt;&lt;button type="submit"&gt;Submit&lt;/form&gt;');
  });
  Router.post('/product', (req,res,next)=&gt;{
      console.log(req.body);
      res.redirect('/');
  });
  
  module.exports = Router;
  </code></pre>
  
  <p>It gives the error:  </p>
  
  <blockquote>
    <p>Router.get('/', (req,res,next)=>{ with get being the problem.</p>
  </blockquote>
  
  <p>Is there something I'm missing to make router work?</p>