翻译自 github地址:https://github.com/Ebookcoin/ebookcoin/tree/v0.1.3
亿书:加密货币驱动的电子书写作和版权保护应用。源码解析与开发指南:《Nodejs开发加密货币》
Ebookcoin is a decentralized application for eBook-writing and copyright-protection powered by the next-generation Crypto Currency. For more information please refer to our website: http://ebookchain.org/.
NOTE: The following is applicable to: Ubuntu 14.04 (LTS) - x86_64.
更新源
sudo apt-get update
sudo apt-get install curl build-essential python
安装SQLite3 (version 3.8.2)
apt-get install -y sqlite3
安装 Node.js (version 0.12.x) + npm:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
nvm install 0.12.14
Install grunt-cli (globally):
npm install grunt-cli -g
Install bower (globally):
Git config --global url."https://github.com".insteadOf git://github.com
npm install bower -g
Install node modules:
npm install
Load git submodules (client and ebookcoin-js),Error: Permission denied (publickey)?:
git submodule init
git submodule update
Build the user-interface:
cd public
npm install
bower install
grunt release
To launch Ebookcoin:
node app.js
NOTE: The port, address and config-path can be overridden by providing the relevant command switch:
node app.js -p [port] -a [address] -c [config-path]
Before running any tests, please ensure Ebookcoin is configured to run on a local testnet (this is the default), and not the mainnet.
Install mocha (globally):
npm install mocha -g
Run the test suite:
npm test
Run individual tests:
mocha test/lib/accounts.js
mocha test/lib/transactions.js