Skip to content

Commit 83dfc96

Browse files
JimiChansl
authored andcommitted
feat(serve): Add support to open with ssl. (angular#3432)
1 parent 51659b9 commit 83dfc96

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/angular-cli/tasks/serve-webpack.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,10 @@ export default Task.extend({
123123
if (err.details) { console.error(err.details); }
124124
reject(err.details);
125125
} else {
126-
const { open, host, port } = serveTaskOptions;
126+
const { open, ssl, host, port } = serveTaskOptions;
127127
if (open) {
128-
opn(url.format({ protocol: 'http', hostname: host, port: port.toString() }));
128+
let protocol = ssl ? 'https' : 'http';
129+
opn(url.format({ protocol: protocol, hostname: host, port: port.toString() }));
129130
}
130131
}
131132
});

0 commit comments

Comments
 (0)