A blog aggregator CLI built as part of the [boot.dev](https://boot.dev) course. Follow RSS feeds and browse their latest posts right from your terminal.
## Requirements
Before you can run gator you'll need to have the following installed:
- **Go** (1.26 or newer)
- **PostgreSQL** (a running server, local or remote)
## Installation
Install the gator CLI with `go install`:
```sh
go install github.com/StevanFreeborn/gator@latest
```
The binary is placed in `$(go env GOPATH)/bin`. Make sure that directory is on your `PATH`:
```sh
exportPATH="$(go env GOPATH)/bin:$PATH"
```
## Setup
### 1. Create a database
Create a database for gator in your Postgres server:
```sh
createdb gator
```
The schema is managed with [goose](https://github.com/pressly/goose) migrations in `sql/schema`. Install goose and apply the migrations:
```sh
go install github.com/pressly/goose/v3/cmd/goose@latest
goose -dir sql/schema postgres "postgres://<user>:<password>@localhost:5432/gator?sslmode=disable" up
```
### 2. Create the config file
gator reads its configuration from `~/.gatorconfig.json`. Create that file with the connection string for your database: