This repository contains an RSS Feed Aggregator built using Go and PostgreSQL. The application aggregates RSS feeds from various sources, stores them in a PostgreSQL database, and provides an API to access and manage the feeds. The API can be tested using Postman.
- Aggregates RSS feeds from multiple sources.
- Stores feed data in a PostgreSQL database.
- Provides RESTful API endpoints for managing and accessing feeds.
- Supports operations like adding, updating, and deleting RSS feeds.
- Fetches the latest articles from subscribed feeds.
- Built with Go for high performance and concurrency.
-
Go (version 1.22 or later)
$ wget https://go.dev/dl/go1.22.5.linux-amd64.tar.gz $ rm -rf /usr/local/go && tar -C /usr/local -xzf go1.23.0.linux-amd64.tar.gz $ export PATH=$PATH:/usr/local/go/bin $ go version
-
PostgreSQL (version 12 or later)
$ sudo apt install postgresql postgresql-contrib $ sudo apt-get install pgadmin3 $ psql --version
-
Postman (for API testing)
$ curl -o- "https://dl-cli.pstmn.io/install/linux64.sh" | sh
-
$ go mod init github.com/roni-boiz/rss-aggregator
-
$ go get github.com/joho/godotenv $ go get github.com/go-chi/chi $ go get github.com/go-chi/cors $ go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest $ go install github.com/pressly/goose/v3/cmd/goose@latest
-
$ go mod vendor $ go mod tidy
-
$ sqlc generate
$ goose postgres postgres://rssauthuser:postgres@localhost:5432/rssagg up
-
$ go build $ go run . - or - $ go build && ./rss-aggregator
Note
Make sure to update username and password of postgres database in the DB_URL
in .env
file
-
$ sudo -u postgres psql -d rssagg
-
$ goose postgres postgres://rssauthuser:postgres@localhost:5432/rssagg down
Note
Need to execute above command multiple time to delete all the SQL schemas.