JavaScript, Nodejs, Web Development, Programming, Software Development.
admin.js file inside of the controllers folder. const AnimeData = require('../models/AnimeData.json'); exports.getIndex = (req, res) => { res.render('index'); }; exports.getAnime = (req, res) => { res.json(AnimeData); }; Next add the code below to the admin.js file inside of the routes folder.