Skip to content

eleinah/gator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gator - A Blog Aggregator

This is for the guided blog aggregator project on Boot.dev

Prerequisites

  • 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.json file in your home directory ($HOME) -- See below on how to set this up.

Installation

You can install Gator CLI with the following:

go install github.com/eleinah/gator/cmd/gator@latest

Configuration File

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...]

login [user]

Logs into a user in the database

register [user]

Register a user into the database

reset

Resets the database

users

Lists all users in the database, and which one is currently logged in

agg [wait time between requests]

Start aggregating posts from feeds and populating the database, refreshing based on the given duration

addfeed [NAME] [URL]

Adds a feed by URL to the database

feeds

Shows all feeds in the database

follow [URL]

Follows a feed by URL for the logged in database user

following

Displays the followed feeds for the logged in database user

unfollow [URL]

Unfollows a feed by URL for the logged in database user

browse [URL]

Browse all posts from followed feeds for the logged in database user

About

Guided project on Boot.dev

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages