Skip to content
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

Open
dkarlovi opened this issue Apr 11, 2024 · 3 comments
Open

HTTP server directly in binary #1907

dkarlovi opened this issue Apr 11, 2024 · 3 comments
Labels
feature Something new good first issue Good for newcomers

Comments

@dkarlovi
Copy link

dkarlovi commented Apr 11, 2024

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.

@alixander
Copy link
Collaborator

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 alixander added good first issue Good for newcomers feature Something new labels Apr 12, 2024
@dkarlovi
Copy link
Author

@alixander when you say

There's a lot to do before this

I'm assuming you don't mean "blockers", you mean "other stuff with higher priority", right?

@alixander
Copy link
Collaborator

alixander commented Apr 12, 2024

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Something new good first issue Good for newcomers
Projects
Status: No status
Development

No branches or pull requests

2 participants