Closed nowrap closed 4 years ago
This way it worked:
// 2019-08-08 added manual socketPath support
// https://github.com/PhilWaldmann/openrecord/issues/98
let config = {};
if (openrecord.socketPath) {
config.connection = {
socketPath: openrecord.socketPath,
user: openrecord.user,
password: openrecord.password,
database: openrecord.database
};
} else {
config.connection = {
host: openrecord.host,
user: openrecord.user,
password: openrecord.password,
database: openrecord.database
};
}
config.type = openrecord.type;
config.autoLoad = openrecord.autoLoad;
config.autoConnect = openrecord.autoConnect;
config.plugins = [require('openrecord/lib/base/dynamic_loading')];
config.models = path.join(__dirname, '/models/*.js');
Hello, i am missing the socketPath option for mysql connections: https://openrecord.js.org/#/setup https://github.com/mysqljs/mysql#connection-options
I tried to use a connection object directly. but than autoLoad and autoConnect didn't work properly anymore:
node_modules/openrecord/lib/stores/mysql/connection.js:
Does someone have an advise?
Regards nowrap