# pocket-cors-rss-proxy

> Lightweight CORS proxy.

Latest version **1.1.2** (published 2022-07-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install pocket-cors-rss-proxy
pnpm add pocket-cors-rss-proxy
yarn add pocket-cors-rss-proxy
bun add pocket-cors-rss-proxy
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2022-07-29 |
| First published | 2022-07-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 2.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Cole Lewis |
| Maintainers | colelewis |
| Keywords | cors |

## Links

- npm: https://www.npmjs.com/package/pocket-cors-rss-proxy
- Repository: https://github.com/colelewis/pocket-cors-rss-proxy
- Homepage: https://github.com/colelewis/pocket-cors-rss-proxy#readme
- Issues: https://github.com/colelewis/pocket-cors-rss-proxy/issues
- npm.io page: https://npm.io/package/pocket-cors-rss-proxy

## Dependencies (3)

- [cors](https://npm.io/package/cors.md) ^2.8.5
- [express](https://npm.io/package/express.md) ^4.18.1
- [dom-parser](https://npm.io/package/dom-parser.md) ^0.1.6

## Recent versions

- 1.1.2 (latest) — 2022-07-29
- 1.1.1 — 2022-07-27
- 1.1.0 — 2022-07-27
- 1.0.0 — 2022-07-27

## README

# 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.](https://www.npmjs.com/package/node-fetch)

### Client-Side
The server returns an [XMLDocument](https://developer.mozilla.org/en-US/docs/Web/API/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](https://img.shields.io/npm/v/pocket-cors-rss-proxy?style=plastic)

---
_Source: https://npm.io/package/pocket-cors-rss-proxy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
