Skip to content

Latest commit

 

History

History
55 lines (47 loc) · 1.83 KB

File metadata and controls

55 lines (47 loc) · 1.83 KB

Backend-Web-Server-using-Go-Postgres-RSS✌️

Welcome to the Go RSS Aggregator project! In this project, we will learn and practice the Go programming language by building a fully fledged RSS aggregator using the Chi web framework, PostgreSQL for data storage, and RSS feeds for content aggregation.

golang

Features

Fetches and parses RSS feeds.
Stores feed content in PostgreSQL.
Displays content using the Chi web framework.

Getting Started

  1. Clone the repository:
git clone https://github.com/shnartho/Backend-Web-Server-using-Go-Postgres
  1. Create .env file in the root dir and add this lines and change accordingly.
PORT=8080
DB_URL=postgres://postgres:{password}@{ip}:{port}/rssagg?sslmode=disable
  1. Install dependencies:
go get -u github.com/go-chi/chi
go get -u github.com/lib/pq
// missing libraries
  1. Set up your PostgreSQL database and update config.go.
  2. Install goose and sqlc. Migrate schema using goose. Go to ./sql/schema and run,
goose postgres postgres://$username:$password@$ip:$port/$db up
// example: goose postgres postgres://postgres:12345@172.23.171.45:5432/rssagg up
  1. Run the app:
go build && ./Backend-Web-Server-using-Go-Postgres

Access the aggregator at http://localhost:8080.

Testing:

🟢1. Create Users

createUsers createUsersPostgres

🟢2. Get Users By API key

GetUsersAPIKey

🟢3. Create, Follow and Unfollow Feeds

createFeed getFeedFollows unfollowFeeds

🟢4. View Posts

getPosts databasePosts