From 258c52099943b8dd38d3bee55e2299677a9d2b81 Mon Sep 17 00:00:00 2001 From: Eric Clemmons Date: Wed, 16 Jan 2019 19:53:23 -0800 Subject: [PATCH] Use path.join for potential path --- packages/polydev/src/middleware/notFound/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/polydev/src/middleware/notFound/index.js b/packages/polydev/src/middleware/notFound/index.js index 538c5a8..46c7ab5 100644 --- a/packages/polydev/src/middleware/notFound/index.js +++ b/packages/polydev/src/middleware/notFound/index.js @@ -27,6 +27,10 @@ module.exports = express() return next() } + const filepath = path + .join(process.cwd(), "routes", req.path, "index.js") + .replace(process.cwd(), ".") + res.status(404).send(` @@ -50,9 +54,7 @@ module.exports = express() - +