title: unexpected token 'export' when using typeorm in heroku
body: <p>I am follwing <a href="https://github.com/typeorm/typeorm/issues/4068" rel="nofollow noreferrer">this</a> thread on how to get TypeORM and PostgreSQL to work in Heroku.</p>
  
  <p>Using <code>ormconfig.js</code> and <code>module.exports</code> I get this error</p>
  
  <pre><code>MissingDriverError: Wrong driver: "undefined" given. Supported drivers are: "cordova", "expo", "mariadb", "mongodb", "mssql", "mysql", "oracle", "postgres", "sqlite", "sqljs", "react-native".
  </code></pre>
  
  <pre><code>const env = require('dotenv')
  env.config()
  
  module.exports = {
    name: 'default',
    type: process.env.DATABASE_TYPE,
    host: process.env.DATABASE_HOST,
    port: 5432,
    username: process.env.DATABASE_USERNAME,
    password: process.env.DATABASE_PASSWORD,
    database: process.env.DATABASE_NAME,
    synchronize: true,
    dropSchema: false,
    logging: true,
    entities: ['/src/**/*.entity.ts', 'dist/**/*.entity.js'],
    extra: {
      ssl: true,
    },
  };
  </code></pre>
  
  <p>The above link says switch to <code>.ts</code> and use <code>export</code></p>
  
  <p>so..using <code>ormconfig.ts</code> and <code>export = config</code> I get this error:</p>
  
  <pre><code>2020-03-25T05:07:57.946988+00:00 app[web.1]: export = config
  2020-03-25T05:07:57.946988+00:00 app[web.1]: ^^^^^^
  2020-03-25T05:07:57.946988+00:00 app[web.1]: 
  2020-03-25T05:07:57.946989+00:00 app[web.1]: SyntaxError: Unexpected token 'export'
  
  </code></pre>
  
  <pre><code>const config = {
    name: 'default',
    type: process.env.DATABASE_TYPE,
    host: process.env.DATABASE_HOST,
    port: 5432,
    username: process.env.DATABASE_USERNAME,
    password: process.env.DATABASE_PASSWORD,
    database: process.env.DATABASE_NAME,
    synchronize: true,
    dropSchema: false,
    logging: true,
    entities: ['/src/**/*.entity.ts', 'dist/**/*.entity.js'],
    extra: {
      ssl: true,
    },
  };
  
  export = config;
  </code></pre>
  
  <p>I've also tried using <code>export default</code> but had same error as with export...</p>
  
  <p>Not exactly sure where to go from here...anyone had this issues?</p>
  
  <p>does babel need to be included to run my node.js apps in heroku? </p>