参考地址
安装环境
系统ubuntu16.04
检查是否已经安装nvm,没有则
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
安装node
nvm install v6 nvm use v6
本地切换只针对当前命令行窗口有效,新打开命令行,需要重新切换v6
源码下载和安裝
下载和安装依赖
git clone https://github.com/bitshares/bitshares-ui.gitcd bitshares-ui npm install
安装中如果遇到问题
先安装cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
然后用cnpm安装所有的包。如果只有"electron"和"electron-builder"无法下载,可暂时删除依赖。
启动服务
npm start
成功的话,会看到以下提示
webpack: Compiled succeedfully.
浏览器中输入以下命令查看运行情况
http://localhost:8080
配置和源码修改
替换掉所有的货币名,搜索所有代码替换,包括js和node_modules/bitsharesjs-ws
修改node_modules/bitsharesjs-ws的chainid,路径node_modules/bitsharesjs-ws/es/src/ChainConfig.js和node_modules/bitsharesjs-ws/cjs/src/ChainConfig.js
修改链的地址和水龙头地址,路径app\api\apiConfig.js
修改交易对等,路径app\stores\SettingsStore.js
let topMarkets = { markets_4018d784: [ // BTS MAIN NET "OPEN.MKR", "BTS", "OPEN.ETH", "ICOO", "BTC", "OPEN.LISK", "BKT", "OPEN.STEEM", "OPEN.GAME", "OCT", "USD", "CNY", "BTSR", "OBITS", "OPEN.DGD", "EUR", "GOLD", "SILVER", "IOU.CNY", "OPEN.DASH", "OPEN.USDT", "OPEN.EURT", "OPEN.BTC", "CADASTRAL", "BLOCKPAY", "BTWTY", "OPEN.INCNT", "KAPITAL", "OPEN.MAID", "OPEN.SBD", "OPEN.GRC", "YOURASSET", "YOYOW", "HERO", "RUBLE" ], markets_39f5e2ed: [ // TESTNET "PEG.FAKEUSD", "YOURASSET", "BTWTY" ] };let bases = { markets_4018d784: [ // BTS MAIN NET "USD", "OPEN.BTC", "CNY", "BTS", "BTC", "YOURASSET" ], markets_39f5e2ed: [ // TESTNET "TEST", "YOURASSET" ] };
let defaults = { unit: [ CORE_ASSET, "USD", "CNY", "BTC", "EUR", "YOURASSET" ] };
水龙头服务搭建
参考搭建比特股的水龙头注册服务,写的很详细,最后总结了一些问题的处理办法
作者:mybestcool
链接:https://www.jianshu.com/p/e58042356dba