Default config file

This commit is contained in:
brunosimon
2016-11-20 22:10:03 +01:00
parent 2491a46e98
commit fadf6aba11
3 changed files with 27 additions and 14 deletions
+5 -2
View File
@@ -43,6 +43,9 @@ class Watcher
if( typeof _options.domain === 'undefined' )
_options.domain = `http://${ip.address()}:${_options.port}`
if( typeof _options.max_file_size === 'undefined' )
_options.max_file_size = 2000
// Save
this.options = _options
}
@@ -104,7 +107,7 @@ class Watcher
// Retrieve stats
fs.stat( _path, ( error, stats ) =>
{
if( stats.size > 999999 )
if( stats.size > this.options.max_file_size )
file.can_read = false
// Read
@@ -145,7 +148,7 @@ class Watcher
// Retrieve stats
fs.stat( _path, ( error, stats ) =>
{
if( stats.size > 999999 )
if( stats.size > this.options.max_file_size )
file.can_read = false
// Read