Skip to content

Commit c5d7c82

Browse files
committed
Merge pull request http-party#109 from peterlcullen/ssl-option
fixes --ssl --cert and --key options
2 parents ef57442 + ad1feda commit c5d7c82

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/http-server

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if (argv.h || argv.help) {
3636
var port = argv.p || parseInt(process.env.PORT, 10),
3737
host = argv.a || '0.0.0.0',
3838
log = (argv.s || argv.silent) ? (function () {}) : console.log,
39-
ssl = !!argv.S,
39+
ssl = !!argv.S || !!argv.ssl,
4040
requestLogger;
4141

4242
if (!argv.s && !argv.silent) {
@@ -72,10 +72,10 @@ function listen(port) {
7272
};
7373
}
7474

75-
if (argv.S) {
75+
if (ssl) {
7676
options.https = {
77-
cert: argv.C || 'cert.pem',
78-
key: argv.K || 'key.pem'
77+
cert: argv.C || argv.cert || 'cert.pem',
78+
key: argv.K || argv.key || 'key.pem'
7979
};
8080
}
8181

0 commit comments

Comments
 (0)