Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 600 Bytes

readme.md

File metadata and controls

28 lines (19 loc) · 600 Bytes

Requrements

  • go 1.16 or higer

  • migrate. install:

    $ curl -L https://github.com/golang-migrate/migrate/releases/download/v4.14.1/migrate.linux-amd64.tar.gz | tar xvz
    $ mv migrate.linux-amd64 $GOPATH/bin/migrate
  • Postgresql database setup

    CREATE DATABASE greenlight;
    CREATE ROLE greenlight WITH LOGIN PASSWORD 'pa55word';
    CREATE EXTENSION IF NOT EXISTS citext;
  • Migrate

    migrate -path=./migrations -database=postgres://greenlight:pa55word@localhost/greenlight?sslmode=disable up

Run

go run ./cmd/api