Server: Reimplemented config system

This commit is contained in:
Paweł Malak
2021-10-21 17:14:25 +02:00
parent 85ee5da025
commit b7de1e3d27
6 changed files with 107 additions and 114 deletions

10
utils/checkFileExists.js Normal file
View File

@@ -0,0 +1,10 @@
const fs = require('fs');
const checkFileExists = (path) => {
return fs.promises
.access(path, fs.constants.F_OK)
.then(() => true)
.catch(() => false);
};
module.exports = checkFileExists;