PHIN VADS written in Go. Load phinvads.dump
into a PostgreSQL database using pg_restore
, run the app with air, and go!
-
Clone this repo:
git clone https://github.com/skylight-hq/phinvads-go.git cd phinvads-go
-
Install and run PostgreSQL, or just run
docker compose up
-
Create an empty database:
psql -c 'CREATE DATABASE phinvads'
-
Load the database dump file:
pg_restore -d phinvads --no-owner --role=$(whoami) phinvads.dump
-
Install Go
-
Install air:
go install github.com/air-verse/air@latest
-
Install mkcert
-
Create your own self-signed certs for local development:
cd tls mkcert -install mkcert localhost cd ..
-
Run the app! If you are only working on backend code, you can just run a simple live reload with air:
air
-
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