-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP server directly in binary #1907
Comments
That's a good idea. Like Python's built-in simple http server. There's a lot to do before this though so if someone with Go experience wants to give it a try, PRs welcome! |
@alixander when you say
I'm assuming you don't mean "blockers", you mean "other stuff with higher priority", right? |
Sorry yes. No blockers for this. Should be relatively straightforward to base off of https://github.com/terrastruct/d2/blob/master/d2cli/watch.go#L483C27-L483C45 . Definitely don't want any new dependencies (e.g. a web framework). |
Currently, the playground repo contains a small Go app which responds to
/render/*
requests. That app could be inlined into the actual D2 binary.Doing so would allow using the app in a "daemon mode", for example building a bunch of diagrams from a static site generator (SSG) by having the binary run in Docker and just build SVGs on demand like an utility / appliance.
Think Hugo in dev mode vs Hugo build.
The text was updated successfully, but these errors were encountered: