summaryrefslogtreecommitdiff
path: root/routes/index.js
blob: 570aea05c4ca4f22c031334d4e076edbf740cf34 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const database = require("../database");
const express = require("express");
const router = express.Router();

/* GET home page. */
router.get('/', (req, res, next) => {
    database.search("crawled", {
        size: 20,
        from: 0,
        query: {
            match_all: {}
        }
    }).then(results => {
        res.json(results.hits)
    })
});

module.exports = router;