Skip to content

Commit f57991f

Browse files
committed
feat: rssfetch page
1 parent 2f39296 commit f57991f

1 file changed

Lines changed: 76 additions & 0 deletions

File tree

  • src/content/docs/solutions/developers/rssfetch
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
title: rssfetch
3+
---
4+
5+
A simple RSS feed fetcher and parser built with [Elysia.js](https://elysiajs.com) and [Bun](https://bun.sh).
6+
7+
A free instance is hosted at: [rssfetch.vercel.app](https://rssfetch.vercel.app). Feel free to use it!
8+
9+
## Deployment
10+
### Vercel
11+
- This project can be directly deployed to Vercel with no additional configuration needed.
12+
- Click the button below to deploy:
13+
14+
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/mikndotdev/rssfetch)
15+
16+
### Cloudflare Workers
17+
- This project can also be deployed to Cloudflare Workers, but requires some manual setup.
18+
- Follow the instructions in the [Elysia Cloudflare Workers documentation](https://elysiajs.com/integrations/cloudflare-worker.html).
19+
20+
### Docker
21+
- Docker images are available on [GHCR](https://github.com/mikndotdev/rssfetch/pkgs/container/rssfetch).
22+
23+
## Manual Setup
24+
25+
1. Install dependencies:
26+
```bash
27+
bun install
28+
```
29+
30+
2. Start the server:
31+
```bash
32+
bun start
33+
```
34+
The server will start on port 3000 by default.
35+
36+
## API Usage
37+
38+
### Fetch RSS Feed
39+
40+
**Endpoint:** `GET /`
41+
42+
**Query Parameters:**
43+
44+
| Parameter | Type | Required | Description | Default |
45+
|-----------|----------|----------|--------------------------------------------------|----------|
46+
| `url` | `string` | **Yes** | The URL of the RSS feed to fetch. | - |
47+
| `type` | `string` | No | Sort order for articles: `latest` or `oldest`. | `latest` |
48+
| `count` | `number` | No | The number of articles to return. | `1` |
49+
| `step` | `number` | No | The offset for pagination (items to skip). | `0` |
50+
51+
**Example Request:**
52+
53+
Fetch the latest 3 articles from an RSS feed:
54+
55+
```bash
56+
curl "http://localhost:3000/?url=https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml&count=3"
57+
```
58+
59+
**Example Response:**
60+
61+
```json
62+
{
63+
"title": "NYT > Top Stories",
64+
"description": "The New York Times: Top Stories",
65+
"link": "https://www.nytimes.com",
66+
"articles": [
67+
{
68+
"title": "Example Article Title",
69+
"link": "https://www.nytimes.com/2024/01/01/example.html",
70+
"description": "Brief description of the article content.",
71+
"pubDate": "Mon, 01 Jan 2024 12:00:00 GMT"
72+
}
73+
// ... 2 more articles
74+
]
75+
}
76+
```

0 commit comments

Comments
 (0)