1.1.2 • Published 2 years ago

pocket-cors-rss-proxy v1.1.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

pocket-cors-rss-proxy

Usage

Server-Side

  • git clone https://github.com/colelewis/pocket-cors-rss-proxy
  • cd pocket-cors-rss-proxy/
  • node index.js
  • Open localhost:8001/source/your RSS URL in a new tab in your web browser.

Note: Depending on your environment, you may have to use node-fetch.

Client-Side

The server returns an XMLDocument element. Fetch calls can be made to retrieve and use the XML data as follows:

fetch('SERVER_IP/source/' + RSS_URL)
      .then(data => data.json())
      .then(contents => contents.rawHTML)
      .then(runner => new window.DOMParser().parseFromString(runner, "text/xml"))
      .then(result => {
        console.log(result)
        // use XML data
      }
);

npm

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago