A mysql extension for block scanning based on aelf-block-scan.
git clone https://github.com/AElfProject/aelf-scan-mysql.git
npm install- install, configure and keep
mysqlandredisserver running in localhost - use
mysqlcreate a database namedaelf_main_chain
cd ./db/
bash init_sql.shread and add your own configs in config.dev.js, especially the mysql and redis connection configs, scan.host is also noteworthy.
npm run devand a pm2 process aelf-scan-mysql was started to running the scanning and sql operations, you need to concern
read and add your own configs in config.prod.js, especially the sql config
npm startRemember don't commit and push your sql config and password
PM2 can be used to stop, start, restart, monitor the process aelf-scan-mysql.