feat: sync mixly static resources, tools and sw-mixly

This commit is contained in:
yczpf2019
2026-01-24 16:12:55 +08:00
parent c8c5fcf726
commit 01b756fed8
173 changed files with 39715 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
const fs = require('fs')
const StaticServer = require('./static-server.js');
const SSLStaticServer = require('./static-sslserver.js');
function deleteFile(filePath) {
try {
if (!fs.existsSync(filePath)) {
return;
}
const stats = fs.statSync(filePath);
if (stats.isFile()) {
fs.unlinkSync(filePath);
console.log('File deleted successfully.');
}
} catch (err) {
console.error('Error deleting file:', err);
}
}
const init = () => {
StaticServer.run('7000');
SSLStaticServer.run('8000');
}
if (!module.parent) {
deleteFile('./nw_cache/Default/Preferences');
init();
} else {
module.exports = init;
}