title: How to export multiple databases in Deno?
body: <p>I have a code like this:</p>
  <pre><code>import { MongoClient } from &quot;./deps.ts&quot;;
  
  const client = new MongoClient();
  await client.connect(Deno.env.get(&quot;MONGODB_URI&quot;) || &quot;&quot;);
  
  const first_db = client.database(Deno.env.get(&quot;DB1_NAME&quot;) || &quot;&quot;);
  const second_db = client.database(Deno.env.get(&quot;DB2_NAME&quot;) || &quot;&quot;);
  
  export default  first_db;
  export  second_db;
  
  
  export const firstCollection = first_db.collection(&quot;first&quot;);
  export const secondCollection = second_db.collection(&quot;second&quot;);
  </code></pre>
  <p>This line of the code <code>    export  second_db;</code> doesn't work and if I add <code>const</code> before <code>second_db</code> it gives me another following error:</p>
  <blockquote>
  <p>Cannot redeclare block-scoped variable 'second_db'.deno-ts(2451)
  'const' declarations must be initialized.deno-ts(1155) Variable
  'second_db' implicitly has an 'any' type.</p>
  </blockquote>
  <p>I don't know how to export multiple databases?</p>
  <p>Also I want to know what is the difference between a database it has <code>default</code> type and the other databases they don't have it?</p>