From ac1fa995d30bab5c7c6ea86a4bd6eef6ee156c5d Mon Sep 17 00:00:00 2001 From: Gavin Gong Date: Wed, 13 Jun 2018 20:56:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=89=8B=E6=9C=BA=E7=99=BB=E9=99=86?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 1043fb2..84ea762 100644 --- a/app.js +++ b/app.js @@ -45,7 +45,7 @@ const { createWebAPIRequest, request } = require("./util/util"); const Wrap = fn => (req, res) => fn(req, res, createWebAPIRequest, request); // 同步读取 router 目录中的js文件, 根据命名规则, 自动注册路由 -fs.readdirSync("./router/").forEach(file => { +fs.readdirSync("./router/").reverse().forEach(file => { if (/\.js$/i.test(file) === false) { return; }