const express = require('express'); const router = express.Router(); const cameras = require('../data/cameras.json') let count = 0; router.get('/', (req, res) => { count++; const i = count % cameras.length; const camera = cameras[i]; return res.json(camera); }); module.exports = router;