add missing res.error

This commit is contained in:
AJ ONeal 2017-05-24 06:23:40 +00:00
parent 5ee8449af6
commit 52a6627e84
1 changed files with 2 additions and 1 deletions

View File

@ -177,7 +177,7 @@ module.exports.create = function (app, xconfx, apiFactories, apiDeps, errorIfApi
// apple.com#blah# apple.com#blah#
// apple.com.us# apple.com#foo#
// apple.com# apple.com#foo#
console.log('nodes', nodes);
console.log('[lib/main.js] nodes', nodes);
nodes.some(function (pkgName) {
console.log('pkgName, appId', pkgName, appId);
if (0 === (appId + '#').indexOf(pkgName + '#')) {
@ -292,6 +292,7 @@ module.exports.create = function (app, xconfx, apiFactories, apiDeps, errorIfApi
// TODO handle assets.example.com/sub/assets/com.example.xyz/
app.use('/api', require('connect-send-error').error());
app.use('/', function (req, res, next) {
// If this doesn't look like an API we can move along
if (!/\/api(\/|$)/.test(req.url)) {