Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 696 Bytes

README.md

File metadata and controls

10 lines (8 loc) · 696 Bytes

Databases in Go

This example uses sqlx along with pgx to connect to a DigitalOcean PostgreSQL database, with support for JSONB (see the favorites column in the dataset).

  1. Import the dataset if necessary
  2. Install the dependencies: go get -u -v ./...
  3. Build the app: go build .
  4. Prepare your PostgreSQL connection string. See the examples README
  5. Start the app: ./go-contacts -conn "PostgreSQL Connection String"
    • You can alternatively pass the connection string in an environment variable named DATABASE_URL