node_modules/@nuxt/server/dist/server.js:154:17
nuxtMiddleware
const nuxtMiddleware = ({ options, nuxt, renderRoute, resources }) => async function nuxtMiddleware (req, res, next) {
// Get context
const context = utils.getContext(req, res);
try {
const url = decodeURI(req.url);
res.statusCode = 200;
const result = await renderRoute(url, context);
// If result is falsy, call renderLoading
if (!result) {
node_modules/connect/index.js:239:7
call
// error-handling middleware
handle(err, req, res, next);
return;
} else if (!hasError && arity < 4) {
// request-handling middleware
handle(req, res, next);
return;
}
} catch (e) {
// replace the error
error = e;
node_modules/connect/index.js:183:5
next
slashAdded = true;
}
}
// call the layer handle
call(layer.handle, route, err, req, res, next);
}
next();
};
node_modules/serve-placeholder/src/index.js:29:16
servePlaceholderMiddleware
// In case of no handler guessed
if (typeof handler === 'undefined') {
if (options.skipUnknown) {
// Skip this middleware
return next()
} else {
// Use 'default' handler
handler = 'default'
}
}
node_modules/connect/index.js:239:7
call
// error-handling middleware
handle(err, req, res, next);
return;
} else if (!hasError && arity < 4) {
// request-handling middleware
handle(req, res, next);
return;
}
} catch (e) {
// replace the error
error = e;
node_modules/connect/index.js:183:5
next
slashAdded = true;
}
}
// call the layer handle
call(layer.handle, route, err, req, res, next);
}
next();
};
node_modules/connect/index.js:161:14
next
var path = parseUrl(req).pathname || '/';
var route = layer.route;
// skip this layer if the route doesn't match
if (path.toLowerCase().substr(0, route.length) !== route.toLowerCase()) {
return next(err);
}
// skip if route match does not border "/", ".", or end
var c = path.length > route.length && path[route.length];
if (c && c !== '/' && c !== '.') {
node_modules/connect/index.js:161:14
next
var path = parseUrl(req).pathname || '/';
var route = layer.route;
// skip this layer if the route doesn't match
if (path.toLowerCase().substr(0, route.length) !== route.toLowerCase()) {
return next(err);
}
// skip if route match does not border "/", ".", or end
var c = path.length > route.length && path[route.length];
if (c && c !== '/' && c !== '.') {
node_modules/serve-static/index.js:121:7
SendStream.error
if (forwardError || !(err.statusCode < 500)) {
next(err)
return
}
next()
})
// pipe
stream.pipe(res)
}