46 lines
1.4 KiB
Markdown
46 lines
1.4 KiB
Markdown
# fiv.server
|
||
|
||
## GIT项目库导航
|
||
* 应用链总入口 [tac/_tac](https://git.faronear.org/tac/_tac)
|
||
* 第五维度 [tac/log](https://git.faronear.org/tac/f iv)
|
||
* 原型设计 [tac/fiv.design](https://git.faronear.org/tac/fiv.design)
|
||
* 客户端 [tac/fiv.h5](https://git.faronear.org/tac/fiv.h5)
|
||
* **<font size=5>服务端 [tac/fiv.server](https://git.faronear.org/tac/fiv.server)</font>**
|
||
* 项目官网 [tac/fiv.home](https://git.faronear.org/tac/fiv.home)
|
||
|
||
## 安装
|
||
|
||
参见 <https://www.mongodb.com/>,分别把 mongodb 和 fiv.server 安装到 /mongodb 和 /fiv/fiv.server
|
||
|
||
## 配置
|
||
|
||
* mongodb 配置文件已集成到 ```fiv.server/mongod.conf``` 中
|
||
* <font color=red>还需要哪些信息?例如 mongodb 的管理账号和密码?</font>
|
||
* bindIp: 127.0.0.1 (生产环境)
|
||
* bindIpAll: true (开发环境)
|
||
* 编写 ```/fiv.server/configSec.js```,设置HD钱包的根密钥等等
|
||
* protocol: https (生产环境)
|
||
* protocol: http (开发环境)
|
||
|
||
## 运行
|
||
|
||
1. 启动 mongodb
|
||
```
|
||
/mongodb/bin/mongod -f /fiv/fiv.server/mongod.conf --logpath /data/log/mongo.log
|
||
```
|
||
以上命令已经被集成到 package.json 中,也可通过 npm 调用:
|
||
```
|
||
npm run mongod
|
||
```
|
||
|
||
2. 启动 fiv.server
|
||
```
|
||
cd /fiv/fiv.server
|
||
node index.js
|
||
```
|
||
|
||
## 部署
|
||
|
||
* 应用后台主机 ```server.fiv.tacever.org```,用户名 ```tic```
|
||
* 数据库主机 ```m1.fiv.tacever.org```,用户名 ```tic```
|