web-app-runner
Advanced tools
Comparing version 0.90.28 to 0.90.29
#!/usr/bin/env node | ||
var conf = require( __dirname + '/conf' ); | ||
'use strict'; | ||
// now run a curl script to issue a shutdown request | ||
var conf = require( __dirname + '/conf' ), | ||
opts = conf.readConfig(), | ||
exec = require( 'child_process' ).exec, | ||
command = [ 'curl -d token=', opts.appkey, ' http://127.0.0.1:', opts.port, '/shutdown' ].join(''), | ||
child; | ||
child = exec(command, function(err, stdout, stderr) { | ||
console.log( stdout ); | ||
if (err) { | ||
console.log( 'error: ', err); | ||
} | ||
if (stderr) { | ||
console.log( stderr ); | ||
} | ||
}); |
@@ -155,4 +155,3 @@ /** | ||
child, | ||
command, | ||
filename; | ||
command; | ||
@@ -171,5 +170,2 @@ args.shift(); | ||
log.info('running child pid: ', child.pid); | ||
// now write the pid to process-port.pid | ||
filename = server.createProcessPIDFile(); | ||
} | ||
@@ -176,0 +172,0 @@ }; |
{ | ||
"name": "web-app-runner", | ||
"version": "0.90.28", | ||
"version": "0.90.29", | ||
"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.", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -79,4 +79,8 @@ # Web App Runner | ||
Where appkey is defined in options and the port is the current listening port. Alternatively, you can find the PID by looking in the logs and send a kill signal (-2 or -9). | ||
Where appkey is defined in options and the port is the current listening port. Alternatively, you can find the PID by looking in the logs and send a kill signal (-2 or -9). There is also a convenient script in the bin folder that will stop a service, daemon or not as long as it's run from the origin server like this: | ||
./bin/stop.js | ||
#### Dynamic Configuration Example | ||
@@ -208,2 +212,2 @@ | ||
- - - | ||
<p><small><em>Copyright © 2014, rain city software | Version 0.90.28</em></small></p> | ||
<p><small><em>Copyright © 2014, rain city software | Version 0.90.29</em></small></p> |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
52169
773
212
1