Skip to content

skylight-hq/phinvads-go

Repository files navigation

phinvads-go

PHIN VADS written in Go. Load phinvads.dump into a PostgreSQL database using pg_restore, run the app with air, and go!

Dev setup

  1. Clone this repo:

    git clone https://github.com/skylight-hq/phinvads-go.git
    cd phinvads-go
  2. Install and run PostgreSQL, or just run docker compose up

  3. Create an empty database:

    psql -c 'CREATE DATABASE phinvads'
  4. Load the database dump file:

    pg_restore -d phinvads --no-owner --role=$(whoami) phinvads.dump
  5. Install Go

  6. Install air:

    go install github.com/air-verse/air@latest
  7. Install mkcert

  8. Create your own self-signed certs for local development:

    cd tls
    mkcert -install
    mkcert localhost
    cd ..
  9. Run the app! If you are only working on backend code, you can just run a simple live reload with air:

    air
  10. Air will also work for the frontend, but you will have to refresh your browser every time you make a change. To get automatic browser reloads, run the app this way:

    templ generate --watch --proxy="http://localhost:4000"
    # Then, in a separate terminal window, run air:
    air -c .air-with-proxy.toml

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •