diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-04-05 18:21:08 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-04-05 18:21:08 +0900 |
| commit | 0ba92a4f299e83ee42ad5b8adb2b4101f58f93e1 (patch) | |
| tree | 1376cebf6d3a1b6de08950882b1964db5098e036 /src | |
| parent | Create Procfile (diff) | |
| download | sharkey-0ba92a4f299e83ee42ad5b8adb2b4101f58f93e1.tar.gz sharkey-0ba92a4f299e83ee42ad5b8adb2b4101f58f93e1.tar.bz2 sharkey-0ba92a4f299e83ee42ad5b8adb2b4101f58f93e1.zip | |
設定でポートが指定されていない場合、環境変数を参照するように
Diffstat (limited to 'src')
| -rw-r--r-- | src/config/load.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/config/load.ts b/src/config/load.ts index 7a4323817f..50ae47d9e2 100644 --- a/src/config/load.ts +++ b/src/config/load.ts @@ -29,6 +29,8 @@ export default function load() { config.url = normalizeUrl(config.url); + config.port = config.port || parseInt(process.env.PORT, 10); + mixin.host = url.host; mixin.hostname = url.hostname; mixin.scheme = url.protocol.replace(/:$/, ''); |