-
Notifications
You must be signed in to change notification settings - Fork 3
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
起動パラメータでポート番号設定対応、IPv6対応 #62
base: main
Are you sure you want to change the base?
Conversation
server.js
Outdated
@@ -12,7 +12,8 @@ const userDataMap = new Map(); // 名前と出来事を記録するマップ | |||
* APIリクエストを処理する | |||
*/ | |||
Deno.serve({ | |||
port: 8080, | |||
port: Deno.args[0] || 8080, |
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.
大きく影響はないかと思いますがnull合体演算子を使った方が良さそうです(yamajiくんから教えてもらいました)
https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing
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.
たしかに、?? のほうがいいね
ポート番号 0 を指定できないバグになりますね
問題なく起動できることを確認しましたLGTM👍 |
概要
VPS上で起動できるようにするため、起動ポートを設定したい
関連
#59
テスト方法
レビュアーチェックリスト