- Node.js + Express used with the node-cron module to fetch RSS feed data in XML format and interract with a web-based PostgreSQL database
- Note: to open web links in a new window use: ctrl+click on link
- An RSS (Really Simple Syndication) feed is coded in XML (Extensible Markup Language) with stripped-down content so is quicker to load.
- RSS parser used to convert XML to JS object
- Node.js v18 Javascript runtime using the Chrome V8 engine
- Express v4 web framework for node
- node-cron v3 tiny task scheduler in pure JavaScript for node.js based on GNU crontab, to schedule a task in node.js using full crontab syntax.
- config v3 to organize hierarchical configurations for app deployment
- rss-parser v3 to convert RSS feed to JS object
- uuid v9 to create version 4 (random) RFC4122 UUIDs
npm i
to install dependencies- Create
.env
and add database credentials - see.env.example
npm run dev
runs app in the development mode with auto-restart.- Open http://localhost:3000 to view it in the browser:
/api
to view supabase data,/api/cron
to view cron data from XML feed that is not already in the supabase database
- tba
supabase.service.ts
supabase client access function that can be imported into other files for supabase operations
import { createClient } from "@supabase/supabase-js";
import config from "config";
const dbUrl = config.get<string>("dbUrl");
const dbKey = config.get<string>("dbKey");
const supabase = createClient(dbUrl, dbKey);
export default supabase;
- tba
- Status: Working
- To-Do: Add other RSS feeds with separate database storage. Add frontend?
- node-cron documentation
- LogRocket: Organizing your Express.js project structure for better productivity
- Joseph Mawa: How to Schedule a Job in Node Using node-cron
- BusinessInsider: A guide to using RSS feeds, the files that contain real-time updates from websites
- Fierce Pharm RSS Feeds
- This project is licensed under the terms of the MIT license.
- Repo created by ABateman, email:
gomezbateman@yahoo.com