diff options
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) { |