mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-02 10:08:02 +08:00
feat: support package
This commit is contained in:
21
lib/pkg.js
Normal file
21
lib/pkg.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const app = require('./app');
|
||||
|
||||
const pkg = (path) =>
|
||||
new Promise((resolve) => {
|
||||
app.callback()(
|
||||
{
|
||||
url: path,
|
||||
method: 'GET',
|
||||
headers: {},
|
||||
socket: {},
|
||||
},
|
||||
{
|
||||
setHeader: () => {},
|
||||
end: (data) => {
|
||||
resolve(data);
|
||||
},
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
module.exports = pkg;
|
||||
Reference in New Issue
Block a user