'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;