Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Latest commit

 

History

History
29 lines (28 loc) · 758 Bytes

README.md

File metadata and controls

29 lines (28 loc) · 758 Bytes

entviz

entviz is an ent extension that creates visual graph (html file) of your ent's schema.

install

go get github.com/hedwigz/entviz

add this extension to ent (see example code) run

go generate ./ent

your html will be saved at ent/schema-viz.html

serve via http

You can use the helper function ent.ServeEntviz to easily serve the static html page over http

http.ListenAndServe("localhost:3002", ent.ServeEntviz())

Use from command line

Install the cmd

go get github.com/hedwigz/entviz/cmd/entviz

Then run inside your project:

entviz ./etc/schema

example

image (3)