Skip to content

andybzn/gator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

23 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Gator

๐Ÿ“ A commandline rss aggre-gator, implemented in Go! ๐Ÿญ

Setup & Usage

This project requires the following dependencies:

  • Go (only required for installation)
  • Postgres, either installed locally or accessible over the network.
  • Goose (only required once, to configure the Postgres database at installation)

Setup and Installation

With Postgres installed, connect (either with psql or a tool like PGAdmin) and create a new database named gator

CREATE DATABASE gator

To configure the postgres database, execute the below commands from the application source directory, providing a valid connection string

cd sql/schema && goose postgres <connection string> up

Gator uses a config file stored at ~/.gatorconfig.json, and requires a valid connection string, as shown below. (Your config should match this format).

{
  "db_url": "postgres://username@localhost:5432/gator?sslmode=disable"
}

To run the program without installing it, run:

go run . <command>

or, to permanently install gator into $GOBIN

go install

If gator is permanently installed, to run a command: gator <command>

Available Commands

  • register <name> - Register a user
  • login <name> - Log in as a registered user
  • users - Display a list of registered users
  • reset - Remove all users, feeds & posts from the database
  • addfeed <feed name> <feed url> - Register a new feed
  • feeds - Display the list of registered feeds
  • follow <feed url> - Follow the provided (registered) feed url
  • unfollow <feed url> - Unfollow the provided (registered) feed url
  • following - Display the list of followed feeds
  • agg <duration> - Poll the registered feeds, at the provided interval. Duration format: 1m | 10m | 1h etc.
  • browse [number] - display the selected number of posts, ordered most recent first. (defaults to 2).

This project was built as part of the Build a Blog Aggregator course on Boot.Dev

About

๐Ÿ“ A commandline rss aggre-gator, implemented in Go! ๐Ÿญ

Topics

Resources

Stars

Watchers

Forks