Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mixdown-server

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mixdown-server - npm Package Compare versions

Comparing version 2.0.1 to 3.0.0

56

lib/worker.js

@@ -23,10 +23,9 @@ var _ = require('lodash');

logger.error(err);
}
else if (externalConfig) {
} else if (externalConfig) {
logger.info('External Config initialized: ' + util.inspect(externalConfig));
// ensure this gets called at least once.
// ensure this gets called at least once.
self.reload();
externalConfig.on('update', function(services) {

@@ -37,6 +36,9 @@ var servs;

if (services && services.length) {
overlays = _.filter(services, function(s) { return s.overlay === true; });
servs = _.reject(services, function(s) { return s.overlay === true; });
}
else{
overlays = _.filter(services, function(s) {
return s.overlay === true;
});
servs = _.reject(services, function(s) {
return s.overlay === true;
});
} else {
logger.error('no services were returned after the configuration change');

@@ -52,4 +54,3 @@ return;

logger.error('Site refresh failed: ', err);
}
else {
} else {
self.reload();

@@ -62,9 +63,9 @@ mixdown.emit('reload', mixdown);

});
//need to do this incase process.send is not defined
//which will be the case when cluster is off
if(process.send){
process.send('ready');
if (process.send) {
process.send('ready');
}
};

@@ -75,13 +76,8 @@

Worker.prototype.getRouter = function(app) {
var router = _.isFunction(app.plugins.router) ? app.plugins.router() : app.plugins.router.create();
var router = _.isFunction(app.router) ? app.router() : app.router.create();
router.on('error', function(err, results) {
var httpContext = results[0].httpContext || {};
var res = httpContext.response || results[0].res,
req = httpContext.request ||results[0].req;
err = err || {};
router.on('error', function(err, httpContext) {
var res = httpContext.response;
res.statusCode = 500;
res.end(err.stack);
res.end(err ? err.stack : null);
});

@@ -100,3 +96,3 @@

app.plugins.init(function(err) {
app.setup(function(err) {
if (err) {

@@ -108,3 +104,3 @@ logger.error(err);

// map the vhost
_.each(app.config.vhosts, function(host) {
_.each(app._config.vhosts, function(host) {
vhosts[host] = app;

@@ -127,6 +123,5 @@ });

app = this.mixdown.apps[appkeys[0]];
}
else {
} else {
host = req.headers.host.replace(/:\d+/, '');
app = this.vhosts[host];
app = this.vhosts[host];
}

@@ -137,4 +132,3 @@

this.getRouter(app).dispatch(req, res);
}
else {
} else {
res.statusCode = 404;

@@ -152,2 +146,2 @@ res.end("Could not find application. Host: " + host);

module.exports = Worker;
module.exports = Worker;
{
"name": "mixdown-server",
"version": "2.0.1",
"version": "3.0.0",
"main": "index",

@@ -12,5 +12,4 @@ "description": "Simple server for activiting a site.",

"author": {
"name": "Vast",
"email": "vastjs-dev@vast.com",
"web": "http://vastdevblog.vast.com/"
"name": "Tommy Messbauer",
"web": "http://www.github.com/tommymessbauer"
},

@@ -32,8 +31,6 @@ "license": "MIT",

"dependencies": {
"lodash": "~2.2.0",
"optimist": "~0.6.0"
"lodash": "2.4.1",
"optimist": "^0.6.1"
},
"devDependencies": {},
"optionalDependencies": {},
"homepage": "http://vastdevblog.vast.com/"
"devDependencies": {}
}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc