Commit 1069256e authored by yPhil's avatar yPhil
Browse files

Favicon dir creation / status checking

parent 80054a36
Pipeline #417388 passed with stage
in 31 seconds
{
"name": "petrolette",
"description": "The news reader that doesn't know you",
"version": "1.3.0A",
"version": "1.3.0b",
"private": true,
"license": "GPL-3.0-only",
"HTTP_PORT": 8000,
......
......@@ -8,11 +8,9 @@ const express = require('express'),
helmet = require("helmet"),
compression = require('compression');
// if (!fs.existsSync(path.join(__dirname, pjson.FAVICONS_CACHE_DIR))){
// fs.mkdirSync(path.join(__dirname, pjson.FAVICONS_CACHE_DIR));
// }
fs.mkdir(path.join(__dirname, pjson.FAVICONS_CACHE_DIR), (err) => {
fs.mkdir(path.join(__dirname, pjson.FAVICONS_CACHE_DIR), {
recursive: true
}, (err) => {
if (err) {
return console.error(err);
}
......@@ -20,15 +18,6 @@ fs.mkdir(path.join(__dirname, pjson.FAVICONS_CACHE_DIR), (err) => {
return true;
});
fs.mkdir(path.join(__dirname, pjson.FAVICONS_CACHE_DIR),
{ recursive: true }, (err) => {
if (err) {
return console.error(err);
}
console.log('Directory created successfully!');
return true;
});
app.set('views', path.join(__dirname, 'views'));
app.engine('html', require('ejs').renderFile);
app.set('view engine', 'html');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment