From 983ddc78d07e97434925eeb722442df1dba2ecf4 Mon Sep 17 00:00:00 2001 From: Christoph Nakazawa Date: Thu, 6 Dec 2018 20:06:48 -0800 Subject: [PATCH] Move middleware files into react-native-internal-cli Summary: These files are used by `js1 run`. By copying them close to `runServer.js` we can soon remove `local-cli`. Reviewed By: TheSavior Differential Revision: D13337487 fbshipit-source-id: ef80317580d5a9b3e560ad1f27b681887cf50b6b --- local-cli/server/middleware/unless.js | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 local-cli/server/middleware/unless.js diff --git a/local-cli/server/middleware/unless.js b/local-cli/server/middleware/unless.js deleted file mode 100644 index e1aa78ac6..000000000 --- a/local-cli/server/middleware/unless.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -'use strict'; - -module.exports = (url, middleware) => { - return (req, res, next) => { - if (req.url === url || req.url.startsWith(url + '/')) { - middleware(req, res, next); - } else { - next(); - } - }; -};