Skip to content
This repository has been archived by the owner on Sep 11, 2019. It is now read-only.
imfly edited this page Apr 6, 2017 · 4 revisions

亿书币

亿书,为人类创作注入新动力!

亿书是一个基于区块链技术的自媒体和版权保护应用,她的底层技术便是这里的亿书币(Ebookcoin)。亿书团队采取开源、开放的心态,积极打造开发社区,并对亿书币源码进行了详细解读,可作为详尽的开发文档使用。

配置系统环境

Ubuntu 14.04 ~ 16.10 (LTS) - x86_64

安装必要的依赖包(命令行操作):

$ sudo apt-get update
$ sudo apt-get install curl build-essential python

安装SQLite3 (version 3.8.2)数据库:

$ sudo apt-get install -y sqlite3

安装 Node.js (版本4.6.2) 和 npm:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
nvm install 4.6.2

MAC OSX (>=10.9)

安装Homeberw

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

安装SQLite3 数据库:

brew install sqlite3

安装 Node.js (*版本>= 4.都可以) 和 npm:

配置工程

全局安装 grunt-cli:

$ npm install grunt-cli -g

全局安装 bower:

$ npm install bower -g

克隆代码:

$ git clone https://github.com/Ebookcoin/ebookcoin.git

安装 node.js 模块:

$ npm install

加载 git 子模块 (clientebookcoin-js):

$ git submodule init
$ git submodule update

:如果遇到权限拒绝错误,如:Error: Permission denied (publickey)?,是你没有配置好使用ssh访问github,请参考这里的文档

构建前端:

$ cd public
$ npm install
$ bower install
$ grunt release

运行

运行亿书:

$ cd ..
$ node app.js

注意: 也可以提供命令行参数 port, address and config-path :

$ node app.js -p [port] -a [address] -c [config-path]

测试

运行测试前,请确保代码是运行在本地测试链上的(这是默认行为),而不是主链。

全局安装 mocha:

$ npm install mocha -g

运行测试套件:

$ npm test

运行独立测试:

$ mocha test/lib/accounts.js
$ mocha test/lib/transactions.js

协议

The MIT License (MIT)

Copyright (c) 2016 Ebookcoin
Copyright (c) 2014-2015 Crypti

Clone this wiki locally