Nikola Petrov f240d4e7c5 format
2023-08-02 14:27:35 +02:00

21 lines
418 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;