Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Add empty webui + rework port config #12

Merged
merged 1 commit into from
May 30, 2022
Merged

Add empty webui + rework port config #12

merged 1 commit into from
May 30, 2022

Conversation

bajtos
Copy link
Contributor

@bajtos bajtos commented May 25, 2022

  • Rework the HTTP server to serve a dummy HTML page at /webui path
  • Rework port configuration to use port number 5500 by default and allow
    the caller to change the port number via PORT environment variable.

- Rework the HTTP server to serve a dummy HTML page at `/webui` path
- Rework port configuration to use port number 5500 by default and allow
  the caller to change the port number via `PORT` environment variable.

Signed-off-by: Miroslav Bajtoš <[email protected]>
@bajtos
Copy link
Contributor Author

bajtos commented May 25, 2022

@aarshkshah1992 please review. I slightly tweaked your initial web server to get it closer to what I envision for the Station Electron app.

@@ -35,27 +42,16 @@ func main() {
}()

time.Sleep(1 * time.Second)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aarshkshah1992 Why is this sleep needed? Are we trying to wait for the HTTP server to start? I believe the listener nl is already accepting new TCP connections by now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bajtos

You are right, we can remove this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, I opened a follow-up PR:
#16

@aarshkshah1992 PTAL

Copy link
Contributor

@aarshkshah1992 aarshkshah1992 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@bajtos bajtos merged commit 4f98ceb into main May 30, 2022
@bajtos bajtos deleted the webui-html branch May 30, 2022 07:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants