Update setup files

This commit is contained in:
sairajzero 2022-11-16 21:43:13 +05:30
parent c5b43291ab
commit c911ca671e
7 changed files with 11 additions and 6 deletions

2
.gitignore vendored
View File

@ -3,6 +3,8 @@
/args/config*.json
/args/param.json
/args/keys*.json
/args/prime_index*.b
/args/indexes*/
/log.txt
/bash_start*
*test*

View File

@ -9,6 +9,7 @@
"express-session": "^1.17.2",
"mysql": "^2.18.1",
"node-fetch": "^2.6.1",
"proper-lockfile": "^4.1.2",
"ws": "^8.2.3"
},
"devDependencies": {},

View File

@ -122,6 +122,6 @@ function configure() {
}
if (!module.parent)
configure().then(_ => null).catch(error => console.error(error));
configure().then(_ => null).catch(error => console.error(error)).finally(_ => process.exit(0));
else
module.exports = configure;

View File

@ -40,6 +40,6 @@ function createSchema() {
}
if (!module.parent)
createSchema().then(_ => null).catch(_ => null);
createSchema().then(_ => null).catch(_ => null).finally(_ => process.exit(0));
else
module.exports = createSchema;

View File

@ -8,7 +8,6 @@ npm run setup - Finish the setup (configure and reset password
npm run configure - Configure the app.
npm run reset-password - Reset the password (for private-key).
npm run create-schema - Create schema in MySQL database.
npm run configure-backup - Configure the backup.
npm run create-backup-schema - Create backup-schema in MySQL database.
npm run backup - Run the backup-node.

View File

@ -23,13 +23,16 @@ getInput.YesOrNo('Do you want to finish the setup now').then(value => {
.catch(_ => console.log('Reset the password later using: '))
.finally(_ => {
console.log('npm run reset-password');
process.exit(0);
})
} else
} else {
console.log('Reset the password later using:\n' + 'npm run reset-password');
process.exit(0);
}
})
})
} else {
console.log('Finish the setup later using:\n' + 'npm run setup');
console.log('To configure for backup use:\n' + 'npm run configure-backup');
process.exit(0);
}
})

View File

@ -89,6 +89,6 @@ function resetPassword() {
}
if (!module.parent)
resetPassword().then(_ => null).catch(error => console.error(error));
resetPassword().then(_ => null).catch(_ => null).finally(_ => process.exit(0));
else
module.exports = resetPassword;