summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'app.js')
-rw-r--r--app.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/app.js b/app.js
index 761d682..901fb86 100644
--- a/app.js
+++ b/app.js
@@ -4,7 +4,8 @@ const path = require('path');
const cookieParser = require('cookie-parser');
const logger = require('morgan');
-const indexRouter = require('./routes/index');
+const searchRouter = require('./routes/search');
+const suggestRouter = require('./routes/suggest');
const app = express();
@@ -14,7 +15,8 @@ app.use(express.urlencoded({extended: false}));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));
-app.use('/', indexRouter);
+app.use('/search', searchRouter);
+app.use('/suggest', suggestRouter);
// catch 404 and forward to error handler
app.use(function (req, res, next) {