A Blog Aggregator in Go
You have to install Postgress and Go to run gator.
To install gator run:
go installTo configure gator you need to:
- Create file in
~/.gatorconfig.json - Edit
~/.gatorconfig.json
{
"db_url": "postgres://postgres:P@ssw0rd!@localhost:5432/gator?sslmode=disable",
"current_user_name": ""
}- Save
~/.gatorconfig.json
You can:
gator run register your_username # create you user
go run users # list users
go run login other_username # login
go run addfeed "Hacker News RSS" "https://hnrss.org/newest" # Add a new feed
go run follow "https://hnrss.org/newest" # Follow a registered feed
go run following # list followed feeds
go run unfollow "https://hnrss.org/newest" # Unfollow a feed
go run agg 1m # pull posts from feed every minute
go run browse 5 # list 5 posts - the limit (5) is optional default limit is 2