This is for the guided blog aggregator project on Boot.dev
- PostgreSQL (check your distribution's official repositories, i.e.
sudo apt search postgres) - Go (install with Webi or through the official Go website)
- A
.gatorconfig.jsonfile in your home directory ($HOME) -- See below on how to set this up.
You can install Gator CLI with the following:
go install github.com/eleinah/gator/cmd/gator@latest
Your configuration file should look something like this to start off with:
{"db_url":"postgress://<USERNAME>:<PASSWORD>@localhost:5432/gator?sslmode=disable","current_user_name":""}
Replace <USERNAME> and <PASSWORD> with the username and password of the system user running Postgres, i.e. postgres:postgres
Commands
The usage for gator is gator <command> [args...]
Logs into a user in the database
Register a user into the database
Resets the database
Lists all users in the database, and which one is currently logged in
Start aggregating posts from feeds and populating the database, refreshing based on the given duration
Adds a feed by URL to the database
Shows all feeds in the database
Follows a feed by URL for the logged in database user
Displays the followed feeds for the logged in database user
Unfollows a feed by URL for the logged in database user
Browse all posts from followed feeds for the logged in database user