Socket
Socket
Sign inDemoInstall

web-app-runner

Package Overview
Dependencies
31
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.90.25 to 0.90.26

public/favicon.svg

7

bin/conf.js
/**
* a sample external configuration file with read functions to enable non-cached requires...
* A sample external configuration file with read functions to enable non-cached requires. As an
* executable this offers much more flexibility than a standard json file.
*/

@@ -13,6 +14,8 @@

port:3005,
log: Logger.createSimpleFileLogger( process.env.HOME + '/logs/staging-3005.log'),
daemon:true
};
var file = [ process.env.HOME, '/logs/staging-', config.port, '.log' ].join('');
config.log = Logger.createSimpleFileLogger( file );
return config;

@@ -19,0 +22,0 @@ };

@@ -18,2 +18,4 @@ /**

log = options.log,
fs = options.fs || require('fs' ),
serviceRunner = options.serviceRunner || require('background-service-runner' ),
port = options.port,

@@ -97,6 +99,2 @@ home = options.home || __dirname,

// constructor validations
if (!log) throw new Error('socket server must be constructed with a log');
if (!port) throw new Error('socket server must be constructed with a port');
var runInstance = function() {

@@ -116,3 +114,3 @@ var childKey = '--run-child-service',

runner = require('background-service-runner' ).createDaemonRunner();
runner = serviceRunner.createDaemonRunner();
child = runner.start( command, args );

@@ -125,2 +123,12 @@

this.__protected = function() {
return {
runInstance:runInstance
};
};
// constructor validations
if (!log) throw new Error('socket server must be constructed with a log');
if (!port) throw new Error('socket server must be constructed with a port');
if (daemon && daemon === true) {

@@ -145,4 +153,8 @@ runInstance();

// assign the dynamic reader if available
opts.readFilters = conf.readFilters;
if (typeof conf.readFilters === 'function') {
// assign the dynamic reader and read in
opts.readFilters = conf.readFilters;
opts.filters = conf.readFilters();
}
}

@@ -149,0 +161,0 @@

{
"name": "web-app-runner",
"version": "0.90.25",
"version": "0.90.26",
"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",

@@ -199,2 +199,2 @@ # Web App Runner

- - -
<p><small><em>Copyright © 2014, rain city software | Version 0.90.25</em></small></p>
<p><small><em>Copyright © 2014, rain city software | Version 0.90.26</em></small></p>

@@ -30,3 +30,4 @@ /**

'logger',
'landingPageRouter'
'landingPageRouter',
'__protected'
];

@@ -37,2 +38,3 @@

server.should.be.instanceof( WebAppRunner );
server.__protected().runInstance.should.be.a('function');
});

@@ -48,2 +50,22 @@

});
describe('#runInstance', function() {
it('should create a child instance and write the pid to process file');
});
describe('landingPageRouter', function() {
it('should read the index page and write to mock response');
});
describe('logger', function() {
it('should log visitors to a mock logger middleware object');
});
describe('createApp', function() {
it('should create a connect app with middleware');
});
describe('start', function() {
it('should create a mock app and start a mock server');
});
});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc