title: How to Export just a Function in NodeJS?
body: <p>How to export only one function, except other functions and import it in other file.</p>
  
  <pre><code>function messsageReceived(message) {
  
        //print message
  
    }
  function readData(){ 
  
      // reads data.
  
    }
  module.exports = mqtt_messsageReceived();
  </code></pre>
  
  <p>I want to use <strong>mqtt_messsageReceived</strong> in other file.</p>