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

Change port numbers #430

Merged
merged 4 commits into from
Oct 22, 2021
Merged

Change port numbers #430

merged 4 commits into from
Oct 22, 2021

Conversation

BenElgar
Copy link
Contributor

No description provided.

@@ -1 +1,2 @@
VITE_API_PORT=4000
# FIXME: this should come from the config.toml
Copy link
Member

Choose a reason for hiding this comment

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

Is this file actually used at all? Seems like this is only relevant if vite is used with server-side rendering otherwise has a server attached, Since we distribute as 100% static build output, I think we can probably delete this file.

Copy link
Contributor Author

@BenElgar BenElgar Oct 22, 2021

Choose a reason for hiding this comment

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

Yes, it's definitely used in the build process, as specified here: https://vitejs.dev/guide/env-and-mode.html#env-files

I confirmed this by changing the value in the file and then grepping for that value in the outputted build:

❯ grep -o -R  'parseInt("ben-port-test")' ./gui/dist
./gui/dist/assets/index.cf1cf057.js:parseInt("ben-port-test")

@@ -213,6 +213,21 @@ func RunServer(ctx context.Context, flags map[string]string) {
Next: mux,
})

go func() {
Copy link
Member

Choose a reason for hiding this comment

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

I think this is OK because when main returns all background goroutines are silently killed, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah

@BenElgar BenElgar merged commit a900b57 into main Oct 22, 2021
@BenElgar BenElgar deleted the change-port-numbers branch October 22, 2021 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants