Skip to content

lpadukana/graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Graph

Graphviz as a service

Why

  • Created to visualize the intermediate results of an algorithm
  • HTTP and GET for easy use (embed in webpages with CORS)
  • Golang because I am learning/liking it

For development

  • Install graphviz
  • Run the program go run main.go
    • This will start the http server at port 9292
  • Use the endpoint
    • curl -G -v "http://localhost:9292/dot/to/svg" --data-urlencode "digraph{a->{1,2,3}}"
    • curl -G -v "http://localhost:9292/dot/to/svg" --data-urlencode "@examples/service.dot"
    • curl -G -v "http://localhost:9292/dot/to/png" --data-urlencode "@examples/by-two.dot"

Build

$ GOOS=linux go build
$ GRAPH_VERSION=1
$ docker build -t graph:${GRAPH_VERSION} .

Run

$ docker run --rm -it -p 9292:9292 graph:${GRAPH_VERSION}

About

Graphviz as a service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published