Add scanner

This commit is contained in:
LordMathis 2017-10-27 15:39:38 +02:00
parent 40c8a25904
commit 7e59fb2640
2 changed files with 13 additions and 0 deletions

View File

@ -31,6 +31,8 @@ app.use(require('express').static('public'))
var api = require('./utils/api'); var api = require('./utils/api');
api(app); api(app);
require('./utils/scanner');
var serverRender = require('./utils/serverRender') var serverRender = require('./utils/serverRender')
app.get("*", serverRender) app.get("*", serverRender)

11
src/utils/scanner.js Normal file
View File

@ -0,0 +1,11 @@
const fs = require('fs');
const compiler = require('./compiler');
const config = require('../static/config/config.json');
module.exports = function() {
fs.readdir(config.contentPath, (err, files) => {
files.forEach(file => {
console.log(file);
})
});
}