Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shnartho/backend-web-server-using-go-postgres
Learn the Go programming language by building a fully fledged RSS aggregator project in Go.
https://github.com/shnartho/backend-web-server-using-go-postgres
chi golang goose postgres rss sqlc
Last synced: about 6 hours ago
JSON representation
Learn the Go programming language by building a fully fledged RSS aggregator project in Go.
- Host: GitHub
- URL: https://github.com/shnartho/backend-web-server-using-go-postgres
- Owner: shnartho
- Created: 2023-08-15T15:36:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-20T22:50:49.000Z (about 1 year ago)
- Last Synced: 2024-11-18T04:39:10.712Z (1 day ago)
- Topics: chi, golang, goose, postgres, rss, sqlc
- Language: Go
- Homepage:
- Size: 21.5 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://fgp.dev/static/media/GolangDevelopmentBanner.aba7a1d6.jpg)
### 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
```
3. 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
```
4. Install dependencies:
```
go get -u github.com/go-chi/chi
go get -u github.com/lib/pq
// missing libraries
```
5. Set up your PostgreSQL database and update config.go.
6. 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:[email protected]:5432/rssagg up
```7. Run the app:
```
go build && ./Backend-Web-Server-using-Go-Postgres
```
Access the aggregator at http://localhost:8080.### Testing:
#### 🟢1. Create Users
![createUsers](./images/createUsers.png)
![createUsersPostgres](./images/createUsersPostgres.png)#### 🟢2. Get Users By API key
![GetUsersAPIKey](./images/GetUsersAPIKey.png)#### 🟢3. Create, Follow and Unfollow Feeds
![createFeed](./images/createFeed.png)
![getFeedFollows](./images/getFeedFollows.png)
![unfollowFeeds](./images/unfollowFeeds.png)#### 🟢4. View Posts
![getPosts](./images/getPosts.png)
![databasePosts](./images/databasePosts.png)