optimize whole environment

This commit is contained in:
2025-06-02 18:13:18 +09:00
parent 4fbf2a4e81
commit 3f85eb8338
15 changed files with 578 additions and 483 deletions

View File

@ -4,12 +4,15 @@
const fs = require('fs');
const RSA = require('node-rsa');
const key = new RSA({ b: 1024 });
const privateKey = key.exportKey('pkcs1-private');
const privateKeyFile = './private.ppk';
if (!fs.existsSync(privateKeyFile)) {
const key = new RSA({ b: 1024 });
const privateKey = key.exportKey('pkcs1-private');
fs.writeFile(privateKeyFile, privateKey, (err) => {
err && console.error(err);
if (err) {
console.error(err);
process.exitCode = 1;
}
});
}