Skip to content

Native driver option does not work #8

@Crocmagnon

Description

@Crocmagnon

Hello,
I'm trying to deploy on Heroku but it complains that SSL is not enabled. I tried activate "native: true" in my database.json file :

{
    "prod": {
        "ENV": "DATABASE_URL",
        "native": true
    },
    "dev": {
        "ENV": "DATABASE_URL"
    }
}

I had no luck. By slightly changing the code in index.js :

exports.connect = function(config, intern, callback) {

    internals = intern;

    log = intern.mod.log;
    type = intern.mod.type;
    console.log("config", config); // Added a console.log
    if (config.native) { pg = pg.native; }
    var db = config.db || new pg.Client(config);
    callback(null, new PgDriver(db, config.schema, intern));
};

We can see that config doesn't contain a native property, so it never enters the condition.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions