当前位置: 首页 > 工具软件 > ebookcoin > 使用案例 >

ebookcoin 安装与入门

钦良弼
2023-12-01

翻译自 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/.

1. Installation

NOTE: The following is applicable to: Ubuntu 14.04 (LTS) - x86_64.

  • 要求要在14.04,但是我的虚拟机安装的是12.04所以有些地方可能会出BUG,会在下面的命令行给出修正措施。
    Install essentials:

更新源

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):

  • 这里在Ubuntu12.04可能会出错,解决方法是先执行命令语句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

2. Launch

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]

3. Tests

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
 类似资料: