12 lines
266 B
JavaScript
12 lines
266 B
JavaScript
const express = require('express');
|
|
const fs = require('fs');
|
|
|
|
var router = express.Router();
|
|
|
|
/* GET home page. */
|
|
router.get('/', function(req, res, next) {
|
|
res.json(JSON.parse(fs.readFileSync('../database/data.json').toString()));
|
|
});
|
|
|
|
module.exports = router;
|