巴林闲侠
2 years ago
2 changed files with 25 additions and 0 deletions
@ -0,0 +1,20 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
function factory (app, opts) { |
||||
|
if (opts.clickHouse) { |
||||
|
try { |
||||
|
for (let r of opts.clickHouse) { |
||||
|
if (r.name && r.root) { |
||||
|
app.fs[r.name] = new paasRequest(r.root, { ...(r.params || {}) }, { dataWord: r.dataWord || 'body' }) |
||||
|
} else { |
||||
|
throw 'opts.pssaRequest 参数错误!' |
||||
|
} |
||||
|
} |
||||
|
} catch (error) { |
||||
|
console.error(error) |
||||
|
process.exit(-1); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
module.exports = factory; |
Loading…
Reference in new issue