ent-minimal-web-server
Code along minimal web server using ent framework golang
- see schema of application use
enviz
:
go run -mod=mod ariga.io/entviz ./ent/schema
curl -sSf https://atlasgo.sh | sh
Migration using Versioned Migration
atlas migrate diff <migration_name> \
--dir "file://ent/migrate/migrations" \
--to "ent://ent/schema" \
--dev-url "docker://postgres/15/test?search_path=public"
atlas migrate apply --url "postgres://<username>:<pass>@<hostname>:5432/<db_name>?search_path=public&sslmode=disable" --dir "file://ent/migrate/migrations"
Run locally
chmod u+x ./tools/serve.sh
./tools/serve.sh