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

空きポートでWebUIを起動する #126

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

shiena
Copy link
Contributor

@shiena shiena commented Feb 4, 2025

現状はWebUIのポート番号が8080で固定なので使用されている場合はサーバーを起動できないので空きポートを使用するように改良しました。

TcpListenerでポート番号0を指定すると未使用ポートがリッスンされるのでそのポートを使っています。
そしてポート番号が動的なのでindex.htmlをテンプレート化してサーバー起動時に生成しています。
最後に生成したindex.htmlを削除します。
また、動的に生成されたindex.htmlをプロジェクトに含めないようにするため.gitignoreで無視しています。

@ayutaz
Copy link
Contributor

ayutaz commented Feb 4, 2025

@shiena ありがとうございます!

@ayutaz ayutaz merged commit 31e26c6 into MidraLab:develop Feb 5, 2025
1 check passed
@shiena shiena deleted the feat/use-unused-port branch February 5, 2025 01:02
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.

2 participants