Use knex instead of js-data
This commit is contained in:
@ -1,4 +1,13 @@
|
||||
var path = require('path');
|
||||
|
||||
module.exports = function getOptions(argv) {
|
||||
var dbOptions = argv.dbOptions;
|
||||
if (typeof dbOptions === 'string') {
|
||||
dbOptions = require(path.resolve(process.cwd(), argv.dbOptions));
|
||||
} else if (typeof dbOptions === 'undefined') {
|
||||
dbOptions = require('../defaultDbOptions.json');
|
||||
}
|
||||
|
||||
return {
|
||||
host: argv.hostname || process.env.npm_package_remotedev_hostname || null,
|
||||
port: Number(argv.port || process.env.npm_package_remotedev_port) || 8000,
|
||||
@ -8,8 +17,7 @@ module.exports = function getOptions(argv) {
|
||||
cert: argv.cert || process.env.npm_package_remotedev_cert || null,
|
||||
passphrase: argv.passphrase || process.env.npm_package_remotedev_passphrase || null
|
||||
},
|
||||
adapter: argv.adapter || process.env.npm_package_remotedev_adapter,
|
||||
dbOptions: argv.dbOptions || process.env.npm_package_remotedev_db,
|
||||
dbOptions: dbOptions,
|
||||
logLevel: argv.logLevel || 3
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user