title: Cannot return method using module exports
body: <p>I am trying to make a <code>database</code> file that <strong>delivers connectio</strong>n, model etc for <code>mongoose (MongoDb)</code>. </p>
  
  <blockquote>
    <p>So when I return the Mongoose Model, the create method becomes
    "undefined".</p>
  </blockquote>
  
  <p><strong><code>database.js</code></strong></p>
  
  <pre><code>//model connection 
  exports.MongoModel = async function ({connectionName, collection, schema}){
      //get connection data 
      const databaseData = connectionsArray[connectionName];
  
      //create url 
      const mongoUrl = `${dbUrl}${databaseData.databaseName}`;
  
      //connection 
      const connection = Mongoose.createConnection(mongoUrl, databaseData.options);
  
      //model with schema
      const Model = connection.model('files',schema);
  
      console.log(Model.create);// displays [Function: create] in console
  
      //return model
      return Model
  }//MongoModel ends 
  </code></pre>
  
  <p>When imported to the other file</p>
  
  <p><strong><code>FileUploads.js</code></strong></p>
  
  <pre><code>const { MongoModel } = require('@src/config/database');
  
  
  const FilesModel = MongoModel({connectionName:'files', collection: 'files', schema: FilesSchema});
  
  console.log(FilesModel); // Displays Promise { Model { files } }
  console.log(FilesModel.create); // Displays undefined
  </code></pre>
  
  <p><em>Note: I am very new to this platform so please pardon me typo's.</em></p>