title: deno connect to mongodb
body: <p>I've tried to follow this tutorial <a href="https://www.youtube.com/watch?v=VF38U2qd27Q" rel="nofollow noreferrer">https://www.youtube.com/watch?v=VF38U2qd27Q</a>, but to no avail.
  I realised that the syntax in the video already obsolete for example connectWithUri to become connect.</p>
  <p>but when I tried to connect to mongo using <a href="https://deno.land/x/mongo@v0.20.1" rel="nofollow noreferrer">deno_mongo</a> with the latest docs, it still not working.</p>
  <pre><code>import { MongoClient } from &quot;https://deno.land/x/mongo@v0.20.1/mod.ts&quot;;
  
  const dbString = `mongodb://${mongoUser}:${mongoPass}@${mongoHost}:${mongoPort}`;
  const client = new MongoClient();
  client.connect(dbString);
  const db = client.database(mongoDB)
  this.users = db.collection&lt;UserSchema&gt;(&quot;users&quot;);
  </code></pre>
  <p>Then I found another library <a href="https://deno.land/x/denodb@v1.0.18" rel="nofollow noreferrer">denodb</a> but again can't connect to mongodb:</p>
  <pre><code>import { Database } from 'https://deno.land/x/denodb/mod.ts';
  
  const dbString = `mongodb://${mongoUser}:${mongoPass}@${mongoHost}:${mongoPort}`;
  this.db = new Database('mongo', {
    uri: dbString,
    database: mongoDB
  });
  </code></pre>
  <p>the error message:</p>
  <pre><code>error: Uncaught AssertionError
  deno        |     throw new AssertionError(msg);
  deno        |           ^
  deno        |     at assert (asserts.ts:152:11)
  deno        |     at MongoClient.database (client.ts:48:5)
  deno        |     at new connectDB (connectDB.ts:35:23)
  </code></pre>
  <p>which part is wrong?</p>