title: How to set useMongoClient (Mongoose 4.11.0)?
body: <p>This is the code I use to connect to my database:</p>
  
  <pre><code>private connectDatabase(databaseUri: string): Promise&lt;Mongoose.Connection&gt; {
      return Mongoose.connect(databaseUri).then(() =&gt; {
          debug('Connected to MongoDB at %O', databaseUri);
          return Mongoose.connection;
      });
  }
  </code></pre>
  
  <p>Today I updated Mongoose to version 4.11.0 and I got this warning when running my tests:</p>
  
  <pre><code>(node:4138) DeprecationWarning: `open()` is deprecated in mongoose &gt;= 4.11.0,
  use `openUri()` instead, or set the `useMongoClient` option if using `connect()`
  or `createConnection()`
  </code></pre>
  
  <p>I can't find any information on how to "set useMongoClient".</p>
  
  <p>Do you guys know how to?</p>