Skip to content

colelewis/pocket-cors-rss-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Lightweight CORS proxy.

Resources

Stars

Watchers

Forks

Packages

No packages published