Change HTTPS API to match grunt-contrib-connect

fixes #218
This commit is contained in:
Joey Baker 2013-10-17 16:16:37 -07:00 committed by Kyle Robinson Young
parent 39c6a55afa
commit 7817d405a0
3 changed files with 6 additions and 9 deletions

View File

@ -188,8 +188,9 @@ watch: {
options: {
livereload: {
port: 9000,
key: 'path/to/ssl.key',
cert: 'path/to/ssl.crt'
key: grunt.file.read('path/to/ssl.key'),
cert: grunt.file.read('path/to/ssl.crt')
// you can pass in any other options you'd like to the https server, as listed here: http://nodejs.org/api/tls.html#tls_tls_createserver_options_secureconnectionlistener
}
},
},

View File

@ -160,8 +160,9 @@ watch: {
options: {
livereload: {
port: 9000,
key: 'path/to/ssl.key',
cert: 'path/to/ssl.crt'
key: grunt.file.read('path/to/ssl.key'),
cert: grunt.file.read('path/to/ssl.crt')
// you can pass in any other options you'd like to the https server, as listed here: http://nodejs.org/api/tls.html#tls_tls_createserver_options_secureconnectionlistener
}
},
},

View File

@ -28,11 +28,6 @@ module.exports = function(grunt) {
if (servers[options.port]) {
this.server = servers[options.port];
} else {
if (options.key && options.cert) {
options.key = grunt.file.read(options.key);
options.cert = grunt.file.read(options.cert);
}
this.server = tinylr(options);
this.server.server.removeAllListeners('error');
this.server.server.on('error', function(err) {