web-app-runner
Advanced tools
Comparing version 0.90.19 to 0.90.21
@@ -109,11 +109,5 @@ /** | ||
var findMatch = function(ip, list) { | ||
var match = false; | ||
list.forEach(function(rx) { | ||
if (ip.match( rx )) { | ||
match = true; | ||
} | ||
return list.some(function(rx) { | ||
return ip.match( rx ); | ||
}); | ||
return match; | ||
}; | ||
@@ -120,0 +114,0 @@ |
@@ -46,3 +46,3 @@ /** | ||
/** | ||
* start the server | ||
* start the server; if daemon is true, then run in a background thread | ||
*/ | ||
@@ -104,2 +104,4 @@ this.start = function() { | ||
var runner; | ||
if (!opts) opts = {}; | ||
@@ -131,5 +133,11 @@ | ||
return new WebAppRunner( opts ); | ||
runner = new WebAppRunner( opts ); | ||
if (opts.daemon && opts.daemon === true) { | ||
runner.start(); | ||
} | ||
return runner; | ||
}; | ||
module.exports = WebAppRunner; |
{ | ||
"name": "web-app-runner", | ||
"version": "0.90.19", | ||
"version": "0.90.21", | ||
"description": "A simple HTTP application server that accepts or rejects connections based on authenticated attributes including ip, user agent, etc. The server can be used stand alone or as middleware for connect or express.", | ||
@@ -17,2 +17,3 @@ "main": "./index.js", | ||
"dependencies": { | ||
"background-service-runner": "^0.90.14", | ||
"connect": "^3.1.0", | ||
@@ -19,0 +20,0 @@ "lodash": "~2.4.1", |
@@ -29,2 +29,4 @@ # Web App Runner | ||
This example shows a more realistic environment where the environment is set to production, configuration is read from a file and the server runs as a cluster of services in a background daemon. | ||
// IP & agent white/black lists defined in config | ||
@@ -38,4 +40,4 @@ var configFile = __dirname + '/config.js', | ||
port:18004, | ||
home:'./', | ||
runAsDaemon:true, | ||
home:'./public', | ||
daemon:true, | ||
clustered:true | ||
@@ -115,2 +117,2 @@ }, | ||
- - - | ||
<p><small><em>Copyright © 2014, rain city software | Version 0.90.19</em></small></p> | ||
<p><small><em>Copyright © 2014, rain city software | Version 0.90.21</em></small></p> |
25736
19
596
116
6
+ Addedbackground-service-runner@0.90.25(transitive)
+ Addedlodash@3.10.1(transitive)
+ Addedpath@0.11.14(transitive)
+ Addedsimple-node-logger@0.92.21(transitive)