Начало работы над BookUpdateChecker

This commit is contained in:
Book Pauk
2022-07-16 13:16:57 +07:00
parent 97fc902cdb
commit 5ccfe71c55
9 changed files with 150 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
let instance = null;
//singleton
class BUCServer {
constructor(config) {
if (!instance) {
this.config = Object.assign({}, config);
this.config.tempDownloadDir = `${config.tempDir}/download`;
fs.ensureDirSync(this.config.tempDownloadDir);
this.down = new FileDownloader(config.maxUploadFileSize);
instance = this;
}
return instance;
}
async main() {
}
}
module.exports = BUCServer;