add missing res.error
This commit is contained in:
parent
5ee8449af6
commit
52a6627e84
|
@ -177,7 +177,7 @@ module.exports.create = function (app, xconfx, apiFactories, apiDeps, errorIfApi
|
||||||
// apple.com#blah# apple.com#blah#
|
// apple.com#blah# apple.com#blah#
|
||||||
// apple.com.us# apple.com#foo#
|
// apple.com.us# apple.com#foo#
|
||||||
// apple.com# apple.com#foo#
|
// apple.com# apple.com#foo#
|
||||||
console.log('nodes', nodes);
|
console.log('[lib/main.js] nodes', nodes);
|
||||||
nodes.some(function (pkgName) {
|
nodes.some(function (pkgName) {
|
||||||
console.log('pkgName, appId', pkgName, appId);
|
console.log('pkgName, appId', pkgName, appId);
|
||||||
if (0 === (appId + '#').indexOf(pkgName + '#')) {
|
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/
|
// TODO handle assets.example.com/sub/assets/com.example.xyz/
|
||||||
|
|
||||||
|
app.use('/api', require('connect-send-error').error());
|
||||||
app.use('/', function (req, res, next) {
|
app.use('/', function (req, res, next) {
|
||||||
// If this doesn't look like an API we can move along
|
// If this doesn't look like an API we can move along
|
||||||
if (!/\/api(\/|$)/.test(req.url)) {
|
if (!/\/api(\/|$)/.test(req.url)) {
|
||||||
|
|
Loading…
Reference in New Issue