Nikola Petrov 46231f5c7c formating
2023-07-20 23:46:23 +02:00

21 lines
420 B
JavaScript

var express = require('express');
const fs = require('fs');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
data = {
title: 'Movies',
scripts: []
};
const f = fs.readdirSync('./public/assets/list/');
f.forEach(file => {
data.scripts.push("/assets/list/" + file);
});
res.render('list', data);
});
module.exports = router;