Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

error: Unknown dialect undefined

Add your database configuration file as follows: 
path: config/env/production/database.js:

const parse = require('pg-connection-string').parse;
const config = parse(process.env.DATABASE_URL);
module.exports = ({ env }) => ({
  connection: {
    client: 'postgres',
    connection: {
      host: config.host,
      port: config.port,
      database: config.database,
      user: config.user,
      password: config.password,
      ssl: {
        rejectUnauthorized: false
      },
    },
    debug: false,
  },
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Unknown #dialect #undefined
ADD COMMENT
Topic
Name
5+5 =