Skip to content

Commit

Permalink
Merge pull request #26 from appleboy/patch
Browse files Browse the repository at this point in the history
fixed undefined livereload port.
  • Loading branch information
avevlad committed Feb 23, 2014
2 parents 6380e82 + 5b3ea80 commit d7561fd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ module.exports = {
o = opt || {};
if (!o.root) o.root = ['app'];
if (!o.port) o.port = 3000;
if (!o.livereload) o.livereload = false;
if (!o.livereload) {
o.livereload = false;
} else {
if (typeof o.livereload == 'boolean') o.livereload = {};
if (!o.livereload.port) o.livereload.port = 35729;
}
if (o.open) {
if (typeof o.open == 'boolean') o.open = {};
if (!o.open.file) o.open.file = '';
Expand All @@ -36,8 +41,6 @@ module.exports = {
.listen(o.port)
.on('listening', function () {
if (o.livereload) {
if (typeof o.livereload == 'boolean') o.livereload = {};
if (!o.livereload.port) o.livereload.port = 35729;
lr = tiny_lr();
lr.listen(o.livereload.port);
}
Expand Down

0 comments on commit d7561fd

Please # to comment.