A backend server in Golang for aggregating RSS feeds from the internet. This project uses PostgreSQL as the database and employs sqlc for managing SQL queries and goose for database migrations.
- Features
- Prerequisites
- Installation
- Clone the Repository
- Setup PostgreSQL
- Install Dependencies
- Database Migrations
- Running the Project
- Aggregates RSS feeds from various sources
- Stores aggregated data in PostgreSQL
- Provides a RESTful API to interact with the aggregated data
- Go 1.16 or later
- PostgreSQL 13 or later
git clone https://github.com/ayushrakesh/go-rssagg.git
cd go-rssagg
- Install PostgreSQL:
On macOS:
brew install postgresql
On Ubuntu:
sudo apt update
sudo apt install postgresql postgresql-contrib
- Start PostgreSQL service:
sudo service postgresql start
- Create a new database and user:
CREATE DATABASE rssagg;
CREATE USER rssuser WITH ENCRYPTED PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE rssagg TO rssuser;
- Install goose for database migrations:
go install github.com/pressly/goose/v3/cmd/goose@latest
- Install sqlc for SQL query management:
go install github.com/kyleconroy/sqlc/cmd/sqlc@latest
- Apply the database migrations:
goose -dir ./sql/schema postgres "user=rssuser password=password dbname=rssagg sslmode=disable" up
- Generate the SQL code with sqlc:
sqlc generate
- Run the project:
go run main.go