mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-03 10:38:03 +08:00
26 lines
606 B
JavaScript
26 lines
606 B
JavaScript
const app = require('./app');
|
|
const config = require('./config');
|
|
|
|
module.exports = {
|
|
setConfig: (conf) => {
|
|
config.set(conf);
|
|
},
|
|
request: (path) =>
|
|
new Promise((resolve) => {
|
|
app.callback()(
|
|
{
|
|
url: path,
|
|
method: 'GET',
|
|
headers: {},
|
|
socket: {},
|
|
},
|
|
{
|
|
setHeader: () => {},
|
|
end: (data) => {
|
|
resolve(data);
|
|
},
|
|
}
|
|
);
|
|
}),
|
|
};
|