diff options
author | Marvin Borner | 2018-11-08 18:19:13 +0100 |
---|---|---|
committer | Marvin Borner | 2018-11-08 18:19:13 +0100 |
commit | d243f31f7d245efce4bd857b32dc758205c28758 (patch) | |
tree | d615c1d5443aeea0ab7dd99c2bd08b34e6ec66f6 /app.js | |
parent | 641ed66837dd4bd45c977978609fb38cbeac9319 (diff) |
Improved search algorithms
Diffstat (limited to 'app.js')
-rw-r--r-- | app.js | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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) { |