Cannot call a method within a class it defined it in ES6 in Node.js : <p>I am making an app using Node.js, Express.js and MongoDB. 
I am using a MVC pattern and also have separate file for routes. 
I am trying me make a Controller class, in which a method calls another method declared within it. But I cannot seem to be able to do this. I get "Cannot read property '' of undefined".</p>

<p>index.js file</p>

<pre><code>let express = require('express');
let app = express();

let productController = require('../controllers/ProductController');

app.post('/product', productController.create);

http.createServer(app).listen('3000');
</code></pre>

<p>ProductController.js file</p>

<pre><code>class ProductController {
  constructor(){}

  create(){
   console.log('Checking if the following logs:');
   this.callme();
  }

 callme(){
  console.log('yes');
 }
}
module.exports = new ProductController();
</code></pre>

<p>When I run this I get following error message:</p>

<pre><code>Cannot read property 'callme' of undefined
</code></pre>

<p>I have ran this code by itself with little modification as following and it works.</p>

<pre><code>class ProductController {
  constructor(){}
  create(){
    console.log('Checking if the following logs:');
    this.callme();
  }

  callme(){
    console.log('yes');
  }
}
let product = new ProductController();
product.create();
</code></pre>

<p>Why does one work and not the other?
HELP!</p>
