設定でポートが指定されていない場合、環境変数を参照するように

This commit is contained in:
syuilo 2019-04-05 18:21:08 +09:00
parent 7dc5009ec7
commit 0ba92a4f29
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
1 changed files with 2 additions and 0 deletions

View File

@ -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(/:$/, '');