Requirements
To run this program you will need to install:
- PostresSQL
- Go CLI
For Dev:
- Goose (for migrations)
go install github.com/pressly/goose/v3/cmd/goose@latest- from
sql/schemadirectory of the project rungoose postgres "postgres://postgres:postgres@localhost:5432/gator" upto do the migrations
- from
- SQLC (for generating models)
go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest- from root of the project run
sqlc generateto build models from SQL files
- from root of the project run
Setup
set up a config in your home directory ~/.gatorconfig.json
{
"db_url": "protocol://username:password@host:port/database?sslmode=disable",
"current_user_name": "username_goes_here"
}
Installation
Because GO does not allow custom names when installing application (as far as I know) you can either:
- install from source with
go installand useboot-dev-blog-aggregatorto run the program, or - build the code with custom name
go build -o gatorand use generated executable instead
Usage
first: make an account
./gator register YOUR_USERNAME
then you can follow some topics:
./gator follow https://blog.boot.dev/index.xml
let them update:
./gator agg 1m
and see the content:
./gator browse X (where X is number of articles to be shown, they are sorted from latest or oldest by publishing data)
Description
Languages
Go
100%