change script for list
This commit is contained in:
parent
43ea7f5308
commit
b2fb9ea911
@ -4,18 +4,7 @@ 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);
|
||||
res.render('list', {title: 'List'});
|
||||
});
|
||||
|
||||
module.exports = router;
|
@ -1,8 +1,4 @@
|
||||
<script src="/assets/elementcreate.js"></script>
|
||||
|
||||
{{#each scripts}}
|
||||
<script defer src="{{this}}"></script>
|
||||
{{/each}}
|
||||
<script src="/assets/list.js"></script>
|
||||
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
|
||||
|
Loading…
x
Reference in New Issue
Block a user