You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
257 B

  1. const fs = require('fs')
  2. const express = require('express')
  3. const router = express.Router()
  4. const db = JSON.parse(fs.readFileSync('./api/db/stats.json', 'utf8'))
  5. // Get statistics.
  6. router.get('/', (req, res) => {
  7. res.json(db)
  8. })
  9. module.exports = router