HHFSBRS/server/routes/index.js

12 lines
279 B
JavaScript
Raw Normal View History

2019-10-29 15:08:56 +01:00
const express = require('express');
const fs = require('fs');
2019-10-29 14:47:53 +01:00
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
2019-10-29 15:50:23 +01:00
res.json(JSON.parse(fs.readFileSync(__dirname + '/../database/data.json').toString()));
2019-10-29 14:47:53 +01:00
});
module.exports = router;