-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: improve stdout ux and run test frontent at /web #55
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
we have static assets only, telemetry was removed in 1d5329d NPM brings no value
since we dont ened to do npm build, we can embedd frontend in the binary, and serve it on the same port as API + printlocalhost URL that can be used for testing this removes the need for running separate http server for frontend, when developing locally
This was referenced Aug 29, 2024
2color
force-pushed
the
chore/remove-npm-build
branch
from
August 30, 2024 11:34
8f2c5a2
to
8b06b8e
Compare
2color
reviewed
Aug 30, 2024
daemon.go
Outdated
@@ -25,6 +26,9 @@ import ( | |||
"github.com/prometheus/client_golang/prometheus" | |||
) | |||
|
|||
//go:embed web | |||
var webFS embed.FS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about moving this to main.go
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took the liberty of moving it. Hope that's ok.
2color
approved these changes
Aug 30, 2024
Thanks! This is a nice improvement |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR
/web
Rationale
Since we dont need to do npm build, we can embedd frontend in the binary, and serve it on the same port as API + printlocalhost URL that can be used for testing
This removes the need for running separate http server for frontend, when developing locally.
Demo
As a convenience, a test frontend is provided at http://localhost:3333/web/?backendURL=http://localhost:3333.