Update README
This commit is contained in:
parent
0d45711e63
commit
bf692f05a7
52
README.md
52
README.md
@ -2,9 +2,10 @@
|
|||||||
# SuperNode Storage
|
# SuperNode Storage
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### Pre-requisite
|
### Pre-requisite
|
||||||
- [X] Nodejs `version >= 12.9`
|
- [X] Nodejs `version >= 12.9` (`--lts` recommended)
|
||||||
- [X] MySQL Server
|
- [X] MySQL Server `version > 8.0`
|
||||||
|
|
||||||
### Download
|
### Download
|
||||||
Download the repository using git:
|
Download the repository using git:
|
||||||
@ -18,45 +19,44 @@ Install using npm:
|
|||||||
cd SuperNodeStorage
|
cd SuperNodeStorage
|
||||||
npm install
|
npm install
|
||||||
```
|
```
|
||||||
|
Finish the configuration when prompted
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
#### General Configuration
|
#### General Configuration
|
||||||
In `args/` directory, Copy `config-sample.json` to `config.json`.
|
If not finished during installation, or to re-configure use:
|
||||||
```
|
```
|
||||||
cp args/config-sample.json args/config.json
|
npm run configure
|
||||||
```
|
```
|
||||||
Edit the values in `args/config.json` as required.
|
|
||||||
```
|
|
||||||
{
|
|
||||||
"privateKey": "<private-key>",
|
|
||||||
"port": "<port>",
|
|
||||||
|
|
||||||
"sql_user": "<MySQL-username>",
|
|
||||||
"sql_pwd": "<MySQL-password>",
|
|
||||||
"sql_db": "<database-name>",
|
|
||||||
"sql_host": "<sql-host>"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
- **private-key**: Private key of the node
|
|
||||||
- **port**: Port of the server to run on
|
- **port**: Port of the server to run on
|
||||||
- **MySQL-username**: Username for MySQL
|
- **MySQL host**: Host of the MySQL server (default: ***localhost***)
|
||||||
- **MySQL-password**: Password for MySQL
|
- **Database name**: Database in which the data should be stored (`<database-name>`) (default: ***supernode***)
|
||||||
- **database-name**: Database in which the data should be stored (default: ***supernode***)
|
- **MySQL username**: Username for MySQL (`<sql-username>`)
|
||||||
- **sql-host**: Host of the MySQL server (default: ***localhost***).
|
- **MySQL password**: Password for MySQL (`<sql-password>`)
|
||||||
|
|
||||||
***Recommended*** *(optional)* Create and use a MySQL user instead of root. Remember to give access to the database to the user.
|
***Recommended*** *(optional)* Create and use a MySQL user instead of root. Remember to give access to the database to the user.
|
||||||
|
|
||||||
#### Parameter Generation *(Optional)*
|
#### Set/Reset Node key password
|
||||||
Open `args/gen-param.html` in a browser and download `param.json` to `SuperNodeStorage/args` directory.
|
If not set during installation, or to reset password, use:
|
||||||
|
```
|
||||||
|
npm run reset-password
|
||||||
|
```
|
||||||
|
- **private key**: Private key of the node
|
||||||
|
- **password**: Password to set for the node (`<password>`)
|
||||||
|
|
||||||
*Note: `param.json` is used for controlled random values used by SecureRandom in Cryptography. If this step is skipped, `param-default.json` will be used as default parameter*
|
**Note**: Private key of the node is encrypted using the `<password>`. Thus use a ***strong*** password.
|
||||||
|
|
||||||
|
### More
|
||||||
|
For help or list of all commands, use
|
||||||
|
```
|
||||||
|
npm run help
|
||||||
|
```
|
||||||
|
|
||||||
## Starting the Server
|
## Starting the Server
|
||||||
After successful installation and configuration using the above steps, SuperNodeStorage can be started using:
|
After successful installation and configuration using the above steps, SuperNodeStorage can be started using:
|
||||||
```
|
```
|
||||||
npm start
|
npm start -- -PASSWORD=<password>
|
||||||
```
|
```
|
||||||
|
|
||||||
##
|
##
|
||||||
For more detailed Installation, check the wiki [here](https://github.com/ranchimall/SuperNodeStorage/wiki).
|
For more information and detailed installation, check the wiki [here](https://github.com/ranchimall/SuperNodeStorage/wiki).
|
||||||
|
|||||||
@ -43,13 +43,13 @@ function configureSQL() {
|
|||||||
flaggedYesOrNo('Do you want to re-configure mySQL connection').then(value => {
|
flaggedYesOrNo('Do you want to re-configure mySQL connection').then(value => {
|
||||||
if (value) {
|
if (value) {
|
||||||
console.log('Enter mySQL connection values: ')
|
console.log('Enter mySQL connection values: ')
|
||||||
getInput.Text('Host', config['sql_host']).then(host => {
|
getInput.Text('MySQL host', config['sql_host']).then(host => {
|
||||||
config['sql_host'] = host;
|
config['sql_host'] = host;
|
||||||
getInput.Text('Database name', config['sql_db']).then(dbname => {
|
getInput.Text('Database name', config['sql_db']).then(dbname => {
|
||||||
config['sql_db'] = dbname;
|
config['sql_db'] = dbname;
|
||||||
getInput.Text('MySQL username', config['sql_user']).then(sql_user => {
|
getInput.Text('MySQL username', config['sql_user']).then(sql_user => {
|
||||||
config['sql_user'] = sql_user;
|
config['sql_user'] = sql_user;
|
||||||
getInput.Text('Mysql password', config['sql_pwd']).then(sql_pwd => {
|
getInput.Text('MySQL password', config['sql_pwd']).then(sql_pwd => {
|
||||||
config['sql_pwd'] = sql_pwd;
|
config['sql_pwd'] = sql_pwd;
|
||||||
resolve(true);
|
resolve(true);
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,13 +1,19 @@
|
|||||||
let message = `
|
let message = `
|
||||||
SuperNode Storage
|
SuperNode Storage
|
||||||
-----------------
|
=================
|
||||||
|
|
||||||
|
Setup
|
||||||
|
-----
|
||||||
npm install - Install the app and node modules.
|
npm install - Install the app and node modules.
|
||||||
npm run help - List all commands.
|
npm run help - List all commands.
|
||||||
npm run setup - Finish the setup (configure and reset password).
|
npm run setup - Finish the setup (configure and reset password).
|
||||||
npm run configure - Configure the app.
|
npm run configure - Configure the app.
|
||||||
npm run reset-password - Reset the password (for private-key).
|
npm run reset-password - Reset the password (for private-key).
|
||||||
|
|
||||||
|
(Optional) Open args/gen-param.html and Download param.json to args/ directory
|
||||||
|
|
||||||
|
Start Node
|
||||||
|
----------
|
||||||
npm start - Start the application (main).
|
npm start - Start the application (main).
|
||||||
|
|
||||||
NOTE: argument 'PASSWORD' required for 'npm start'
|
NOTE: argument 'PASSWORD' required for 'npm start'
|
||||||
@ -16,7 +22,9 @@ npm start -- -PASSWORD=<password>
|
|||||||
(Optional) 'console.debug' is now turned off by default. pass argument '--debug' to turn it on
|
(Optional) 'console.debug' is now turned off by default. pass argument '--debug' to turn it on
|
||||||
npm start -- -PASSWORD=<password> --debug
|
npm start -- -PASSWORD=<password> --debug
|
||||||
|
|
||||||
(Optional) Open args/gen-param.html and Download param.json to args/ directory
|
Debugging
|
||||||
|
---------
|
||||||
|
npm run checksum-db - List the stored node tables and checksum
|
||||||
`;
|
`;
|
||||||
|
|
||||||
console.log(message);
|
console.log(message);
|
||||||
Loading…
Reference in New Issue
Block a user